[ https://issues.apache.org/jira/browse/SPARK-36698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pablo Langa Blanco updated SPARK-36698: --------------------------------------- Description: With {code:java} spark.sql.parser.quotedRegexColumnNames=true{code} regular expressions are not allowed in expressions like {code:java} SELECT `col_.*`/exp FROM (SELECT 3 AS col_a, 1 as exp){code} I propose to improve this behavior and allow this regular expression when it expands to only one named expression. It’s the same behavior in Hive. *Example 1:* {code:java} SELECT `col_.*`/exp FROM (SELECT 3 AS col_a, 1 as exp){code} col_.* expands to col_a: OK *Example 2:* {code:java} SELECT `col_.*`/col_b FROM (SELECT 3 AS col_a, 1 as col_b){code} col_.* expands to (col_a, col_b): Fail like now Related with SPARK-36488 was: With spark.sql.parser.quotedRegexColumnNames=true regular expressions are not allowed in expressions like {code:java} SELECT `col_.*`/exp FROM (SELECT 3 AS col_a, 1 as exp){code} I propose to improve this behavior and allow this regular expression when it expands to only one named expression. It’s the same behavior in Hive. *Example 1:* {code:java} SELECT `col_.*`/exp FROM (SELECT 3 AS col_a, 1 as exp){code} col_.* expands to col_a: OK *Example 2:* {code:java} SELECT `col_.*`/col_b FROM (SELECT 3 AS col_a, 1 as col_b){code} col_.* expands to (col_a, col_b): Fail like now Related with SPARK-36488 > Allow expand 'quotedRegexColumnNames' in all expressions when it’s expanded > to one named expression > --------------------------------------------------------------------------------------------------- > > Key: SPARK-36698 > URL: https://issues.apache.org/jira/browse/SPARK-36698 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.3.0 > Reporter: Pablo Langa Blanco > Priority: Minor > > With > {code:java} > spark.sql.parser.quotedRegexColumnNames=true{code} > regular expressions are not allowed in expressions like > {code:java} > SELECT `col_.*`/exp FROM (SELECT 3 AS col_a, 1 as exp){code} > I propose to improve this behavior and allow this regular expression when it > expands to only one named expression. It’s the same behavior in Hive. > *Example 1:* > {code:java} > SELECT `col_.*`/exp FROM (SELECT 3 AS col_a, 1 as exp){code} > col_.* expands to col_a: OK > *Example 2:* > {code:java} > SELECT `col_.*`/col_b FROM (SELECT 3 AS col_a, 1 as col_b){code} > col_.* expands to (col_a, col_b): Fail like now > > Related with SPARK-36488 -- 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