>From Ali Alsuliman <[email protected]>:

Attention is currently required from: Ayush Tripathi.
Ali Alsuliman has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045 )

Change subject: Rewrite Like operator with % suffix as AND Operator.
......................................................................


Patch Set 7:

(10 comments)

Commit Message:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/c1f2b668_dc70bca2
PS7, Line 7: Rewrite Like operator with % suffix as AND Operator.
Change the title to:
[ASTERIXDB-3525][COMP] Rewrite Like operator with % suffix as AND Operator


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/bfc03a9b_1ce20723
 
PS7, Line 16: Change-Id: I22a4a5b94c89ae8f7132b52848cfe300f09b1645
Add Ext-ref: MB-XXXX after the Details.


File asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/3f51e955_7575ebc1
PS7, Line 9996: <compilation-unit name="q02">
Place this new test under 
"src/test/resources/runtimets/queries_sqlpp/index-selection". Name the folder 
"like-expression".
Add more tests to cover more scenarios:
- test for the cases where the pattern contains "%" or "_" (in the presence and 
absence of trailing "%").
- test for the cases where you make sure the upper bound is not returned.
- test for the cases where the pattern is a single char followed by %, "x%" for 
example.


File 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/85dce2dd_28b7674b
PS7, Line 86: createANDExpressionHelper
Name this 'createRangeExpression' and move this method to the bottom of the 
file.
You will need to change the method signature because for LIKE we want GE and 
LT, not GE and LE:
createRangeExpression(Expression target, OperatorType leftOp, Expression left, 
Expression right, OperatorType rightOp, OperatorExpr operatorExpr)


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/2d913fbc_6d6b8e1e
PS7, Line 110: value
Name this 'patternExpr'.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/e1b82b88_60347cc3
PS7, Line 111: s
First, name this 'patternStr'.
Second, use ExpressionUtils.getStringLiteral(patternExpr). See how it does it. 
Don't use instanceof.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/5630d835_881c7c89
PS7, Line 118: "%"
Define a class "ConstantUtil" in "org.apache.asterix.common.utils" and place 
the "%" and "_" there.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/76cd9fa4_dc5086ca
PS7, Line 119: withoutSuffix
Name this 'prefix'.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/372f8836_df43aff7
PS7, Line 123: result
Name this 'incrementedStr'


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045/comment/638eaaf2_31e552d4
PS7, Line 126: createANDExpressionHelper(target, left, right, operatorExpr);
Isn't this going to use GE and LE when we want GE and LT? You need to add a 
test case to cover this if you haven't already.



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19045
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I22a4a5b94c89ae8f7132b52848cfe300f09b1645
Gerrit-Change-Number: 19045
Gerrit-PatchSet: 7
Gerrit-Owner: Ayush Tripathi <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Ayush Tripathi <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-CC: Murtadha Hubail <[email protected]>
Gerrit-Attention: Ayush Tripathi <[email protected]>
Gerrit-Comment-Date: Wed, 06 Nov 2024 22:01:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Reply via email to