[
https://issues.apache.org/jira/browse/IMPALA-13460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17891038#comment-17891038
]
ASF subversion and git services commented on IMPALA-13460:
----------------------------------------------------------
Commit 9008e1bfcbcc40e02285f20503e19e4f38026c65 in impala's branch
refs/heads/master from Steve Carlin
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=9008e1bfc ]
IMPALA-13459: Handle duplicate table in same query
WHen there are 2 references of the same table in a query, there needs
to be a unique alias name used within the TableRef object. Code has
been added to generate an alias.
IMPALA-13460 has been filed because we should use the user provided
alias name rather than a generated alias name. This is a little more
difficult to implement because Calcite has a limitation in that their
table object at validation time is equivalent to a FeTable in that there
is only one object for the multiple tables.
In order to fix IMPALA-13460, there is a Calcite bug that has to be
fixed. We'd have to generate our own TableScan object underneath their
LogicalTableScan that would hold an alias. This TableScan can be
generated through their RelBuilder Factory object. But the current
code creates the LogicalTableScan directly rather than go through
a factory, so that would need to be fixed first.
There are no unit tests attached to this Jira, but there are some
tpcds queries that will start working when this gets committed.
Change-Id: Ib9997bc642c320c2e26294d7d02a05bccbba6a0d
Reviewed-on: http://gerrit.cloudera.org:8080/21945
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Michael Smith <[email protected]>
> Calcite planner: alias not showing up in explain plan text
> ----------------------------------------------------------
>
> Key: IMPALA-13460
> URL: https://issues.apache.org/jira/browse/IMPALA-13460
> Project: IMPALA
> Issue Type: Bug
> Reporter: Steve Carlin
> Priority: Major
>
> After IMPALA-13459 is checked in, there is an issue in the explain plan. If
> the same table is used twice in a query, the Calcite planner uses a generated
> alias rather than the given alias in the query and thus is showing the wrong
> information in the query plan.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]