Hello Anon. E. Moose (1000171), Jenkins, I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/3400 to look at the new patch set (#7). Change subject: [ASTERIXDB-2288][COMP] Fix field access with UNION ...................................................................... [ASTERIXDB-2288][COMP] Fix field access with UNION - user model changes: no - storage format changes: no - interface changes: no Details: For UNION, if there is an assign operator above UNION, the optimizer will move the assign operator under UNION into both branches. If the assign operator has field access by index, the index is based on the output record of the union operator which could be different from the field index in left and right branches. The fix is to convert the index into a named field, and then move the assign operator. The optimizer will fire by-name-to-by-index rule after this and replace the name with the correct index for each record of left and right branch. by-name-to-by-index rule is already a required rule to be fired after push-assign-under-union rule. Change-Id: I4d65374aca6959fd5e70279fac8f7f0a6c7c64c5 --- M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/RuleCollections.java R asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushAssignBelowUnionAllRule.java A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.1.ddl.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.2.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.3.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.4.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.5.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.6.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.7.ddl.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/results/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.3.adm A asterixdb/asterix-app/src/test/resources/runtimets/results/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.4.adm A asterixdb/asterix-app/src/test/resources/runtimets/results/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.5.adm A asterixdb/asterix-app/src/test/resources/runtimets/results/misc/field_access_union-ASTERIXDB-2288/field_access_union-ASTERIXDB-2288.6.adm M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml 14 files changed, 345 insertions(+), 7 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/00/3400/7 -- 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: newpatchset Gerrit-Change-Id: I4d65374aca6959fd5e70279fac8f7f0a6c7c64c5 Gerrit-Change-Number: 3400 Gerrit-PatchSet: 7 Gerrit-Owner: Ali Alsuliman <ali.al.solai...@gmail.com> Gerrit-Reviewer: Anon. E. Moose (1000171) Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu>