Dmitry Lychagin has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3400 )

Change subject: [ASTERIXDB-2288][COMP] Fix field access with UNION
......................................................................


Patch Set 8:

(2 comments)

https://asterix-gerrit.ics.uci.edu/#/c/3400/8/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushAssignBelowUnionAllRule.java
File 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushAssignBelowUnionAllRule.java:

https://asterix-gerrit.ics.uci.edu/#/c/3400/8/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushAssignBelowUnionAllRule.java@196
PS8, Line 196:         if 
(!functionCall.getFunctionIdentifier().equals(BuiltinFunctions.FIELD_ACCESS_BY_INDEX))
 {
I'd move this 'if' outside of this method into modifyExpression loop. So line 
190 would be: if 
(functionCall.getFunctionIdentifier().equals(BuiltinFunctions.FIELD_ACCESS_BY_INDEX))
 { mapFieldIndex(...) }


https://asterix-gerrit.ics.uci.edu/#/c/3400/8/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushAssignBelowUnionAllRule.java@220
PS8, Line 220:                 fieldIndex = inputType.getFieldIndex(fieldName);
what if it returns -1 (not found)?



--
To view, visit https://asterix-gerrit.ics.uci.edu/3400
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4d65374aca6959fd5e70279fac8f7f0a6c7c64c5
Gerrit-Change-Number: 3400
Gerrit-PatchSet: 8
Gerrit-Owner: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Dmitry Lychagin <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Comment-Date: Mon, 20 May 2019 22:33:58 +0000
Gerrit-HasComments: Yes

Reply via email to