Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18023#discussion_r126271044
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala ---
    @@ -847,6 +847,12 @@ object SQLConf {
           .intConf
           
.createWithDefault(UnsafeExternalSorter.DEFAULT_NUM_ELEMENTS_FOR_SPILL_THRESHOLD.toInt)
     
    +  val SUPPORT_QUOTED_REGEX_COLUMN_NAME = 
buildConf("spark.sql.parser.quotedRegexColumnNames")
    +    .doc("When true, quoted Identifiers (using backticks) in SELECT 
statement are interpreted" +
    --- End diff --
    
    @janewangfb You can do something like:
    
        scala> val df = Seq((1, 2), (2, 3), (3, 4)).toDF("a", "b")
        df: org.apache.spark.sql.DataFrame = [a: int, b: int]
        scala> df.groupBy("a", "b").agg(df.col("*")).show
        +---+---+---+---+
        |  a|  b|  a|  b|
        +---+---+---+---+
        |  2|  3|  2|  3|
        |  1|  2|  1|  2|
        |  3|  4|  3|  4|
        +---+---+---+---+
    
    So I guess you can also do something like:
    
        scala> df.groupBy("a", "b").agg(df.colRegex("`...`"))
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to