mirror of
https://github.com/apache/impala.git
synced 2026-01-08 12:02:54 -05:00
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 Reviewed-on: http://gerrit.cloudera.org:8080/9631 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Impala Public Jenkins