xueyumusic opened a new pull request #7281: bump calcite version to 1.18.0 in 
druid-sql
URL: https://github.com/apache/incubator-druid/pull/7281
 
 
   This PR bumps calcite version to 1.18.0 in druid-sql to pick up new 
features, improvements, and bug-fixes in calcite-1.18.0.
   The updated test cases are mainly for compatible of sql planning changes in 
calcite-1.18.0. The special two cases which have different results are 
`testNullStringEquality` and `testCountStarWithDegenerateFilter`  due to 
different plan...
   
   For `testNullStringEquality`
   1.17.0
   ```
   ...
   
rel#27:LogicalFilter.NONE.[[]](input=rel#20:Subset#1.NONE.[],condition=CASE(=($0,
 'a'), CAST(true):BOOLEAN, =($0, null)))
     call#64 rule [ReduceExpressionsRule(Filter)]
       
rel#21:LogicalFilter.NONE.[](input=rel#20:Subset#1.NONE.[],condition==(CASE(=($0,
 'a'), null, $0), null))
   ...
   ```
   
   1.18.0
   ```
   ...
   rel#27:LogicalFilter.NONE.[](input=rel#20:Subset#1.NONE.[],condition=IS 
TRUE(=($0, 'a')))
     call#64 rule [ReduceExpressionsRule(Filter)]
       
rel#21:LogicalFilter.NONE.[](input=rel#20:Subset#1.NONE.[],condition==(CASE(=($0,
 'a'), null, $0), null))
   ...
   ```
   
   For `testCountStarWithDegenerateFilter`
   1.17.0
   ```
   ...
   
rel#31:LogicalFilter.NONE.[[]](input=rel#21:Subset#1.NONE.[],condition=AND(=($1,
 'a'), OR(>($0, 'a'), IS NOT NULL($0))))
     call#64 rule [ReduceExpressionsRule(Filter)]
       
rel#22:LogicalFilter.NONE.[](input=rel#21:Subset#1.NONE.[],condition=AND(=($1, 
'a'), OR(>($0, 'a'), <($0, 'b'))))
   ...
   
rel#39:DruidQueryRel.NONE.[[]](query={"queryType":"scan","dataSource":{"type":"table","name":"foo"},"intervals":{"type":"intervals","intervals":["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},"virtualColumns":[],"resultFormat":"compactedList","batchSize":20480,"limit":9223372036854775807,"filter":{"type":"and","fields":[{"type":"selector","dimension":"dim2","value":"a","extractionFn":null},{"type":"or","fields":[{"type":"bound","dimension":"dim1","lower":"a","upper":null,"lowerStrict":true,"upperStrict":false,"extractionFn":null,"ordering":{"type":"lexicographic"}},{"type":"not","field":{"type":"selector","dimension":"dim1","value":null,"extractionFn":null}}]}]},"columns":["__time","cnt","dim1","dim2","dim3","m1","m2","unique_dim1"],"legacy":false,"context":{"defaultTimeout":300000,"maxScatterGatherBytes":9223372036854775807,"sqlCurrentTimestamp":"2000-01-01T00:00:00Z","sqlQueryId":"dummy"},"descending":false,"granularity":{"type":"all"}},signature={__time:LONG,
 cnt:LONG, dim1:STRING, dim2:STRING, dim3:STRING, m1:FLOAT, m2:DOUBLE, 
unique_dim1:COMPLEX})
     call#362 rule [DruidQueryRule(WHERE_FILTER)]
       
rel#32:LogicalFilter.NONE.[[]](input=rel#19:Subset#0.NONE.[],condition=AND(=($3,
 'a'), OR(>($2, 'a'), IS NOT NULL($2))))
   ...
   ```
   
   1.18.0
   ```
   ...
   rel#34:LogicalProject.NONE.[](input=rel#33:Subset#5.NONE.[],dim1=$2,dim2=$3)
     call#84 rule [FilterProjectTransposeRule]
       
rel#22:LogicalFilter.NONE.[](input=rel#21:Subset#1.NONE.[],condition=AND(=($1, 
'a'), OR(>($0, 'a'), <($0, 'b'))))
   ...
   
rel#42:DruidQueryRel.NONE.[](query={"queryType":"scan","dataSource":{"type":"table","name":"foo"},"intervals":{"type":"intervals","intervals":["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},"virtualColumns":[],"resultFormat":"compactedList","batchSize":20480,"limit":9223372036854775807,"filter":{"type":"selector","dimension":"dim2","value":"a","extractionFn":null},"columns":["__time","cnt","dim1","dim2","dim3","m1","m2","unique_dim1"],"legacy":false,"context":{"defaultTimeout":300000,"maxScatterGatherBytes":9223372036854775807,"sqlCurrentTimestamp":"2000-01-01T00:00:00Z","sqlQueryId":"dummy"},"descending":false,"granularity":{"type":"all"}},signature={__time:LONG,
 cnt:LONG, dim1:STRING, dim2:STRING, dim3:STRING, m1:FLOAT, m2:DOUBLE, 
unique_dim1:COMPLEX})
     call#360 rule [DruidQueryRule(WHERE_FILTER)]
       
rel#31:LogicalFilter.NONE.[](input=rel#19:Subset#0.NONE.[],condition=AND(=($3, 
'a'), OR(>($2, 'a'), <($2, 'b'))))
   ...
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to