korlov42 commented on code in PR #7150:
URL: https://github.com/apache/ignite-3/pull/7150#discussion_r2592626301


##########
modules/sql-engine/src/test/resources/tpch/plan/q20.plan:
##########
@@ -91,7 +91,7 @@ Project
                           index: L_SK_PK
                           type: SORTED
                           predicate: AND(=(L_PARTKEY, $cor2.PS_PARTKEY), 
=(L_SUPPKEY, $cor2.PS_SUPPKEY), SEARCH(L_SHIPDATE, 
Sarg[[1994-01-01..1995-01-01)]))
-                          searchBounds: [ExactBounds [bound=$cor2.PS_SUPPKEY], 
ExactBounds [bound=$cor2.PS_PARTKEY]]
+                          searchBounds: <$cor2.PS_SUPPKEY>, <$cor2.PS_PARTKEY>

Review Comment:
   that's actually has to be `<$cor2.PS_SUPPKEY, $cor2.PS_PARTKEY>`
   
   at every i-th position search bounds represents available options of i-th 
position in index key. Hence, to compute the actual tuple used as index bound, 
you have to compute cartesian product of all options. Here is another example:
   
   ```
   [MultiBounds [bounds=ArrayList [ExactBounds [bound=1], ExactBounds 
[bound=2], ExactBounds [bound=3]]],  ExactBounds [bound='foo']]
   ```
   
   This represents following search keys:
   ```
   <1, 'foo'>, <2, 'foo'>, <3, 'foo'>
   ```
   
   Take a look at 
`org.apache.ignite.internal.sql.engine.exec.exp.SearchBoundsImplementor#expandBounds`
 for reference



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to