Alex Behm has uploaded this change for review. ( http://gerrit.cloudera.org:8080/9631
Change subject: IMPALA-5270: Pass resolved exprs into analytic SortInfo. ...................................................................... IMPALA-5270: Pass resolved exprs into analytic SortInfo. The bug was that the SortInfo of analytics was given ordering exprs that were not fully resolved against their input (e.g. inline views were not resolved). As a result, the SortInfo logic did not materialize exprs like rand() coming from inline views. The fix is to pass fully resolved exprs to the analytic SortInfo, and then the existing materialization logic properly handles non-deterministic built-ins and UDFs. The code around sort generation was rather convoluted and difficult to understand. I overhauled SortInfo to unify the different uses of it under a common codepath After that cleanup, the fix for this issue was trivial. Testing: - Locally ran planner tests - Locally ran analytic EE tests in test_queries.py - Core/hdfs run passed Change-Id: Id2b3f4e5e3f1fd441a63160db3c703c432fbb072 --- M fe/src/main/java/org/apache/impala/analysis/QueryStmt.java M fe/src/main/java/org/apache/impala/analysis/SortInfo.java M fe/src/main/java/org/apache/impala/planner/AnalyticPlanner.java M fe/src/main/java/org/apache/impala/planner/Planner.java M fe/src/main/java/org/apache/impala/planner/SortNode.java M testdata/workloads/functional-planner/queries/PlannerTest/sort-expr-materialization.test 6 files changed, 176 insertions(+), 182 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/31/9631/1 -- To view, visit http://gerrit.cloudera.org:8080/9631 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id2b3f4e5e3f1fd441a63160db3c703c432fbb072 Gerrit-Change-Number: 9631 Gerrit-PatchSet: 1 Gerrit-Owner: Alex Behm <[email protected]>
