[
https://issues.apache.org/jira/browse/PHOENIX-6365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17410394#comment-17410394
]
ASF GitHub Bot commented on PHOENIX-6365:
-----------------------------------------
stoty commented on a change in pull request #1133:
URL: https://github.com/apache/phoenix/pull/1133#discussion_r702617007
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java
##########
@@ -701,8 +723,7 @@ public Void visit(ProjectedColumnExpression expression) {
indexProjectedColumns.add(expression);
PColumn col = expression.getColumn();
// hack'ish... For covered columns with local
indexes we defer to the server.
- if (col instanceof ProjectedColumn &&
((ProjectedColumn) col)
- .getSourceColumnRef() instanceof
LocalIndexDataColumnRef) {
+ if (context.getDataColumns().contains(col)) {
Review comment:
Both the old and the new code checks wheter the column will be added
from the base table by the coprocessor.
The old resolver returns a ProjectedColumn to a LocalIndexDataColumnRef, but
the new resolver simply returns the projected column, so the logic wouldn't
fire.
By checking if the column is in context.getDataColumns(), we check if a
LocalIndexDataColumnRef has been created for this column, even if that is
unwrapped by the time reach here.
Most of the non-test changes outside FromCompiler are actually compensating
for this change in the resolver behaviour.
I wonder if there is a better way to change the resolver, so that we can get
by with less changes to the code outside FromComplier.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> Bogus AmbiguousTableException in query with aliases on local indexed tables
> ---------------------------------------------------------------------------
>
> Key: PHOENIX-6365
> URL: https://issues.apache.org/jira/browse/PHOENIX-6365
> Project: Phoenix
> Issue Type: Task
> Components: core
> Affects Versions: 5.1.0, 4.16.0
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
>
> Certain queries with aliases on tbales with local indexes throw
> AmbiguousTableException
--
This message was sent by Atlassian Jira
(v8.3.4#803005)