[
https://issues.apache.org/jira/browse/PHOENIX-6365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17279969#comment-17279969
]
ASF GitHub Bot commented on PHOENIX-6365:
-----------------------------------------
stoty commented on pull request #1133:
URL: https://github.com/apache/phoenix/pull/1133#issuecomment-774264986
This causes a few tests that try to access columns by un-aliased names to
fail.
My first instinct was to look up the standard, but It's not free. However,
what resources ARE available, all state that you must not refer to an aliased
table by its original name
https://crate.io/docs/sql-99/en/latest/chapters/18.html#correlation-name
`Once you’ve defined a <Correlation name> for a Table, you must use it to
refer to that Table throughout the entire transaction – for example, whenever
you would normally use the <Table name> to qualify a <Column name>, use the
<Correlation name> instead.
`
I've tested with mariadb, and it works as described above.
I don't know if this behaviour has historical reasons, or a simple bug that
got codified in the tests, but think that we should strive to sql compatible,
and follow the standard.
WDYT @gjacoby126 ?
----------------------------------------------------------------
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.
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
> 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)