[ https://issues.apache.org/jira/browse/CALCITE-4674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated CALCITE-4674: ------------------------------------ Labels: pull-request-available (was: ) > Excess quotes in generated SQL when STAR is a column alias > ---------------------------------------------------------- > > Key: CALCITE-4674 > URL: https://issues.apache.org/jira/browse/CALCITE-4674 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.27.0 > Reporter: Stamatis Zampetakis > Assignee: Stamatis Zampetakis > Priority: Major > Labels: pull-request-available > Fix For: 1.28.0 > > Time Spent: 10m > Remaining Estimate: 0h > > The following valid SQL query: > {code:sql} > select "customer_id" as "*" from "customer"; > {code} > changes slightly semantics when it is parsed, optimized, and transformed back > to SQL via {{RelToSqlConverter}}. > +Actual+ > {code:sql} > SELECT "customer_id" AS """*""" FROM "foodmart"."customer"; > {code} > Note the extra quotes appearing in the {{AS}} clause. Aliasing columns > differently is undesirable and can have an impact when this query pattern > appears as part of a larger query and there are usages of the alias. > +Expected+ > {code:sql} > SELECT "customer_id" AS "*" FROM "foodmart"."customer"; > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)