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

    https://github.com/apache/spark/pull/21479#discussion_r192516776
  
    --- Diff: 
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -592,6 +592,7 @@ primaryExpression
         | identifier                                                           
                    #columnReference
         | base=primaryExpression '.' fieldName=identifier                      
                    #dereference
         | '(' expression ')'                                                   
                    #parenthesizedExpression
    +    | EXTRACT '(' field=(YEAR | QUARTER | MONTH | WEEK | DAY | HOUR | 
MINUTE | SECOND) FROM source=valueExpression ')'           #extract
    --- End diff --
    
    How about `EXTRACT '(' field=identifier FROM source=valueExpression ')'` 
instead of introducing each term?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to