Skip to content

Conversation

@Jackie-Jiang
Copy link
Contributor

Another attempt of #13605, see more details there.
Comparing to #13605, this fix keeps the current behavior, but avoid the expensive processing or huge OR/AND list

@Jackie-Jiang
Copy link
Contributor Author

@gortiz Can you help check if this also solves the problem? I feel this is a safer option without changing the query plan

@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.96%. Comparing base (59551e4) to head (9ea9e40).
Report is 764 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13614      +/-   ##
============================================
+ Coverage     61.75%   61.96%   +0.21%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2555     +119     
  Lines        133233   140710    +7477     
  Branches      20636    21862    +1226     
============================================
+ Hits          82274    87190    +4916     
- Misses        44911    46885    +1974     
- Partials       6048     6635     +587     
Flag Coverage Δ
custom-integration1 <0.01% <ø> (-0.01%) ⬇️
integration <0.01% <ø> (-0.01%) ⬇️
integration1 <0.01% <ø> (-0.01%) ⬇️
integration2 0.00% <ø> (ø)
java-11 61.92% <ø> (+0.21%) ⬆️
java-21 61.85% <ø> (+0.22%) ⬆️
skip-bytebuffers-false 61.94% <ø> (+0.19%) ⬆️
skip-bytebuffers-true 61.81% <ø> (+34.08%) ⬆️
temurin 61.96% <ø> (+0.21%) ⬆️
unittests 61.96% <ø> (+0.21%) ⬆️
unittests1 46.47% <ø> (-0.42%) ⬇️
unittests2 27.70% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gortiz
Copy link
Contributor

gortiz commented Jul 16, 2024

This patch is not enough. There are several places where SEARCH is converted into ORs. This patch is attacking one of the places (our expand rule) but not the other I know, which is when calcite validates queries. There, Calcite uses SqlToRelConverter.Config.inSubQueryThreshold to decide whether INs are going to be converted into ORs or not. The default value is 20, which means that any IN with less than 20 literals is converted into ORs while in the other case it is kept as IN and considered a subquery. Later in the pipeline (I don't know exactly where yet) the IN subquery is converted into an actual subquery which in our case is evaluated as a pipeline breaker.

@Jackie-Jiang
Copy link
Contributor Author

Discussed offline. We will merge this one to reduce the overhead, in the meanwhile trying to figure out a thorough solution.

@Jackie-Jiang Jackie-Jiang added performance multi-stage Related to the multi-stage query engine labels Jul 16, 2024
@Jackie-Jiang Jackie-Jiang merged commit 4422e9a into apache:master Jul 16, 2024
@Jackie-Jiang Jackie-Jiang deleted the expand_search_rule branch July 16, 2024 18:41
rajagopr pushed a commit to rajagopr/pinot that referenced this pull request Jul 17, 2024
ege-st pushed a commit to ege-st/pinot that referenced this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multi-stage Related to the multi-stage query engine performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants