liancheng edited a comment on issue #24840: [SPARK-27998][SQL] Column alias should support quote string URL: https://github.com/apache/spark/pull/24840#issuecomment-500952463 @lipzhu ANSI SQL uses double quotes to quote identifiers with special characters. Basically, double-quotes in ANSI SQL is equivalent to backquotes in Spark SQL while ANSI SQL single-quotes are for string literals. That being said, I don't think ANSI SQL ever allows *string literals* to be used as aliases. It has to be an identifier. The SQL '03 [grammar rule][1] also suggests that. In the future, if we have something like "SQL dialect profile" that allows users to switch between different dialects and use double-quotes for quoting identifiers and single-quotes for quoting strings, then we can have this syntax. But right now, the syntax change proposed in this PR is inconsistent and violates ANSI SQL. [1]: https://ronsavage.github.io/SQL/sql-2003-2.bnf.html#as%20clause
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
