Joe McDonnell has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21575 )

Change subject: IMPALA-13221: Calcite: Enable tpcds and tpch queries
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21575/12/java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/util/ImpalaBaseTableRef.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/util/ImpalaBaseTableRef.java:

http://gerrit.cloudera.org:8080/#/c/21575/12/java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/util/ImpalaBaseTableRef.java@33
PS12, Line 33:   public ImpalaBaseTableRef(TableRef tableRef, Path resolvedPath,
             :       SimplifiedAnalyzer basicAnalyzer) throws ImpalaException {
             :     super(tableRef, resolvedPath);
             :     // Impala's table uniqueAlias is within the scope of each 
Analyzer.
             :     // Since Impala uses a separate Analyzer instance for each 
query block
             :     // it can maintain the uniqueness.  However, since the 
Calcite planner
             :     // uses a single SimplifiedAnalyzer for entire query and 
there are no
             :     // longer separate query blocks (they have already been 
unnested), it needs
             :     // to make the alias globally unique.
             :     Preconditions.checkState(aliases_.length > 0);
             :     aliases_[0] = 
basicAnalyzer.getUniqueTableAlias(getUniqueAlias());
             :   }
When I run a query like this:
select a.id from functional.alltypes a, functional.alltypes b where a.id = b.id;

In the text plan, there are no references to the "a" or "b" aliases. It's as if 
those don't exist. Instead, there are references to "functional.alltypes" and 
"functional.alltypes_0". Same deal if they are different tables.

Maybe it has always been that way, but it would be nice to hook up the real 
aliases.



--
To view, visit http://gerrit.cloudera.org:8080/21575
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3107d336ac07ecd89530b640165798ec6a574f41
Gerrit-Change-Number: 21575
Gerrit-PatchSet: 12
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]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Thu, 10 Oct 2024 17:15:26 +0000
Gerrit-HasComments: Yes

Reply via email to