Skip to content

[JAY-796] Fix QueryBuilder#merge docs and tests - #85

Open
sergio-bobillier wants to merge 1 commit into
sb-JAY-796-query-intersectfrom
sb-JAY-796-fix-query-merge-doc
Open

sergio-bobillier wants to merge 1 commit into
sb-JAY-796-query-intersectfrom
sb-JAY-796-fix-query-merge-doc

Conversation

@sergio-bobillier

Copy link
Copy Markdown
Collaborator

The documentation for this method was wrong, it claimed that, when two QueryBuilders are merged their query clauses are put together with a boolean must clause, however, this is only true when either of the clauses is not a boolean clause.

When both clauses are boolean clauses, the result is a compound boolean clause in which equivalent boolean subclauses are merged into a single one.

This commit fixes the issue and expands the documentation to properly describe the correct behavior of the merge operation.

An unnecessary #allow for a call to #must is also being removed from the method's tests.

Both the documentation and the stray #allow are leftovers from a previous implementation.

@sergio-bobillier
sergio-bobillier added this pull request to stack #84 October 9, 2026 15:38
@sergio-bobillier sergio-bobillier self-assigned this Oct 9, 2026
@sergio-bobillier
sergio-bobillier force-pushed the sb-JAY-796-fix-query-merge-doc branch from 43dbe08 to cb84db3 Compare October 27, 2026 11:59
The documentation for this method was wrong, it claimed that, when two
QueryBuilders are merged their query clauses are put together with a
boolean 'must' clause, however, this is only true when either of the
clauses is not a boolean clause.

When both clauses are boolean clauses, the result is a compound boolean
clause in which equivalent boolean subclauses are merged into a single
one.

This commit fixes the issue and expands the documentation to properly
describe the correct behavior of the merge operation.

An unnecessary #allow for a call to #must is also being removed from the
method's tests.

Both the documentation and the stray #allow are leftovers from a
previous implementation.
@sergio-bobillier
sergio-bobillier force-pushed the sb-JAY-796-fix-query-merge-doc branch from cb84db3 to 6fe3017 Compare October 27, 2026 15:21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant