Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-45806

GROUP BY ALL don't work in ansi mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.0, 3.5.0
    • None
    • SQL
    • None

    Description

      I noticed that we treat 'ALL' in 'GROUP BY ALL' as an Identifier in parsing, and this will cause problem when I turn on ansi keyword behavior
      set spark.sql.ansi.enabled=true;
      set spark.sql.ansi.enforceReservedKeywords=true;

      spark-sql (default)> select a,b,c, count from values(1,2,3)t(a,b,c) group by all;

      [PARSE_SYNTAX_ERROR] Syntax error at or near 'all'.(line 1, pos 59)

      == SQL ==
      select a,b,c, count from values(1,2,3)t(a,b,c) group by all
      -----------------------------------------------------------^^^

      can we allow this reserved keyword in ansi mode ?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xiaozongcui XiaozongCui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: