Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22546 )
Change subject: IMPALA-13786: Skip rewriting expr of Hive auto-generated label ...................................................................... IMPALA-13786: Skip rewriting expr of Hive auto-generated label IMPALA-10836 introduced the SimplifyCastExprRule optimization to simplify CAST expressions. However, applying this rewrite rule over expression referred by Hive auto-generated label has caused AnalysisException like following: AnalysisException: Could not resolve column/field reference: 'failing_view._c0' It is most likely that, before IMPALA-10836, expression referred by Hive auto-generated label never effectively being rewritten. Thus, the ExprSubstitutionMap across multiple InlineViewRef was intact. This patch attempt to fix the issue by making any expression in SelectList that mapped to Hive auto-generated label ineligible for any kind of expression rewrite. Also addressed some flake8 errors in test_views_compatibility.py. Testing: - Add test case in views-compatibility.test. - Break test_view_compatibility_hive into 3 separate tests. - Refactor test_views_compatibility.py to run both EXPLAIN and SELECT query over the test view. - Pass test_views_compatibility.py in exhaustive exploration. - Pass core tests. Change-Id: I4b8bbd0afd6da0532bf2ef460989d4f01337d198 Reviewed-on: http://gerrit.cloudera.org:8080/22546 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/main/java/org/apache/impala/analysis/SelectList.java M fe/src/main/java/org/apache/impala/analysis/SelectListItem.java M testdata/workloads/functional-query/queries/QueryTest/views-compatibility.test M tests/metadata/test_views_compatibility.py 4 files changed, 111 insertions(+), 77 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/22546 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4b8bbd0afd6da0532bf2ef460989d4f01337d198 Gerrit-Change-Number: 22546 Gerrit-PatchSet: 7 Gerrit-Owner: Riza Suminto <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]>
