[
https://issues.apache.org/jira/browse/CALCITE-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16818299#comment-16818299
]
Julian Hyde commented on CALCITE-2996:
--------------------------------------
Currently the query
{code}select 1 as x, c as y, c2 from t{code}
gives the columns
{noformat}
(label=x, column=null, table=null)
(label=y, column=c table=t)
(label=c2, column=c2, table=t)
{noformat}
Are you saying we should instead give
{noformat}
(label=x, column=null, table=null)
(label=y, column=y, table=t)
(label=c2, column=c2, table=t)
{noformat}
(Note that {{column=y}}.) I'm not sure I agree.
> using column label as column name
> ---------------------------------
>
> Key: CALCITE-2996
> URL: https://issues.apache.org/jira/browse/CALCITE-2996
> Project: Calcite
> Issue Type: Wish
> Components: avatica
> Affects Versions: avatica-1.13.0
> Reporter: masterclock
> Priority: Major
> Fix For: next
>
>
> [https://github.com/apache/calcite-avatica/blob/master/core/src/main/java/org/apache/calcite/avatica/ColumnMetaData.java#L122]
> according to the above line, column label is used only when column name is
> missing, this behavior makes the the go driver lost column alias name in sql
> expression. I'd hope swap the column name and label in the code, can we?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)