Skip to content

Simplify bounds/range vs selectors/equality logic in SQL planning. (#14619)#14624

Merged
abhishekagarwal87 merged 1 commit intoapache:27.0.0from
gianm:backport-14619-to-27
Jul 21, 2023
Merged

Simplify bounds/range vs selectors/equality logic in SQL planning. (#14619)#14624
abhishekagarwal87 merged 1 commit intoapache:27.0.0from
gianm:backport-14619-to-27

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Jul 20, 2023

Backport #14619 to 27.0.0.

…pache#14619)

* Simplify bounds/range vs selectors/equality logic in SQL planning.

1) Consolidate duplicate code related to Expressions#buildTimeFloorFilter.

2) Cleaner logic in Expressions#toSimpleLeafFilter: choose bounds vs range
   filter based solely on plannerContext.isUseBoundsAndSelectors, not also
   considering rhs kind. Use parsed rhs in both paths (except for numerics
   in the bound path).

3) Fix ArrayContains, ArrayOverlap to avoid equality filters when there is
   an extractionFn present. Fixes a bug introduced in apache#14612.

* Avoid sending nonprimitives down the bound path.
@gianm gianm added the Backport label Jul 20, 2023
@gianm gianm added this to the 27.0 milestone Jul 20, 2023
@abhishekagarwal87 abhishekagarwal87 merged commit 5b5d495 into apache:27.0.0 Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants