[jira] [Commented] (SPARK-36635) spark-sql do NOT support that select name expression as string type now
[ https://issues.apache.org/jira/browse/SPARK-36635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17409225#comment-17409225 ] Hyukjin Kwon commented on SPARK-36635: -- can you justify why it should work? is it ANSI standard or other DBMSes support? > spark-sql do NOT support that select name expression as string type now > > > Key: SPARK-36635 > URL: https://issues.apache.org/jira/browse/SPARK-36635 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.1.0, 3.1.2 >Reporter: weixiuli >Priority: Major > > The follow statement would throw an exception. > {code:java} > sql("SELECT age as 'a', name as 'n' FROM VALUES (2, 'Alice'), (5, 'Bob') > people(age, name)") > {code} > {code:java} > // Exception information > Error in query: > mismatched input ''a'' expecting {, ';'}(line 1, pos 14) > == SQL == > SELECT age as 'a', name as 'n' FROM VALUES (2, 'Alice'), (5, 'Bob') > people(age, name) > --^^^ > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-36635) spark-sql do NOT support that select name expression as string type now
[ https://issues.apache.org/jira/browse/SPARK-36635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17409222#comment-17409222 ] weixiuli commented on SPARK-36635: -- It didn't work before either. > spark-sql do NOT support that select name expression as string type now > > > Key: SPARK-36635 > URL: https://issues.apache.org/jira/browse/SPARK-36635 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.1.0, 3.1.2 >Reporter: weixiuli >Priority: Major > > The follow statement would throw an exception. > {code:java} > sql("SELECT age as 'a', name as 'n' FROM VALUES (2, 'Alice'), (5, 'Bob') > people(age, name)") > {code} > {code:java} > // Exception information > Error in query: > mismatched input ''a'' expecting {, ';'}(line 1, pos 14) > == SQL == > SELECT age as 'a', name as 'n' FROM VALUES (2, 'Alice'), (5, 'Bob') > people(age, name) > --^^^ > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-36635) spark-sql do NOT support that select name expression as string type now
[ https://issues.apache.org/jira/browse/SPARK-36635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17408530#comment-17408530 ] Hyukjin Kwon commented on SPARK-36635: -- did it work before? > spark-sql do NOT support that select name expression as string type now > > > Key: SPARK-36635 > URL: https://issues.apache.org/jira/browse/SPARK-36635 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.1.0, 3.1.2 >Reporter: weixiuli >Priority: Major > > The follow statement would throw an exception. > {code:java} > sql("SELECT age as 'a', name as 'n' FROM VALUES (2, 'Alice'), (5, 'Bob') > people(age, name)") > {code} > {code:java} > // Exception information > Error in query: > mismatched input ''a'' expecting {, ';'}(line 1, pos 14) > == SQL == > SELECT age as 'a', name as 'n' FROM VALUES (2, 'Alice'), (5, 'Bob') > people(age, name) > --^^^ > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org