Hello Aman Sinha, Anonymous Coward (816), Joe McDonnell, Michael Smith, Impala 
Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/21945

to look at the new patch set (#3).

Change subject: IMPALA-13459: Handle duplicate table in same query
......................................................................

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
---
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaHdfsScanRel.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/util/ImpalaBaseTableRef.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteTable.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/util/SimplifiedAnalyzer.java
4 files changed, 93 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/45/21945/3
--
To view, visit http://gerrit.cloudera.org:8080/21945
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib9997bc642c320c2e26294d7d02a05bccbba6a0d
Gerrit-Change-Number: 21945
Gerrit-PatchSet: 3
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Anonymous Coward (816)
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>

Reply via email to