[
https://issues.apache.org/jira/browse/IMPALA-10836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17931144#comment-17931144
]
ASF subversion and git services commented on IMPALA-10836:
----------------------------------------------------------
Commit f59c0917fe382f675c6fa0f55e9b84791db579e5 in impala's branch
refs/heads/master from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=f59c0917f ]
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]>
> Add simplify cast rule
> ----------------------
>
> Key: IMPALA-10836
> URL: https://issues.apache.org/jira/browse/IMPALA-10836
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Reporter: Xianqing He
> Assignee: Sheng Wang
> Priority: Major
> Fix For: Impala 4.1.0
>
>
> For the function cast we can add the following optimizations:
> # Removes the inner case conversion expressions that are unnecessary, e.g.
> cast(cast(col as int) as string) => cast(col as string)
> # Removes unnecessary cast when the input is already the correct type, e.g.
> col is bigint, cast(col as bigint) => col
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]