You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/05 13:35:45 UTC

[GitHub] [spark] maropu commented on a change in pull request #30816: [SPARK-33818][SQL][DOC] Add descriptions about `spark.sql.parser.quotedRegexColumnNames` in the SQL documents

maropu commented on a change in pull request #30816:
URL: https://github.com/apache/spark/pull/30816#discussion_r551935000



##########
File path: docs/sql-ref-syntax-qry-select.md
##########
@@ -151,6 +151,18 @@ SELECT [ hints , ... ] [ ALL | DISTINCT ] { named_expression [ , ... ] }
 
      Specifies aliases for one or more source window specifications. The source window specifications can
      be referenced in the widow definitions in the query.
+     
+* **regex_column_names**
+
+     When `spark.sql.parser.quotedRegexColumnNames` is true, quoted identifiers (using backticks) in `SELECT`
+     statement are interpreted as regular expressions and `SELECT` statement can take regex-based column specification.
+     For example, below SQL will only take column `c`:
+
+     ```sql
+     SELECT `(a|b)?+.+` FROM (
+       SELECT 1 as a, 2 as b, 3 as c
+     ) src

Review comment:
       How about moving this example into the bottom of this page just like the other SQL references?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org