beliefer commented on a change in pull request #24792:
[SPARK-27943][SPARK-27953][SQL] Add new feature create table could specify
column with default constraint
URL: https://github.com/apache/spark/pull/24792#discussion_r292379139
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -735,7 +735,7 @@ colTypeList
;
colType
- : identifier dataType (COMMENT STRING)?
+ : identifier dataType (COMMENT STRING)? (DEFAULT
defaultExpression=expression)?
Review comment:
> Is that `defaultExpression=expression` scope too big for DDL default
constraint? In my memory, the common default constraint are `NULL`, `NUMBER`,
`STRING`, `CURRENT_DATE`, `CURRENT_TIMESTAMP`.
Thanks for your review. As your said, The description of this PR contains a
discussion about the scope of default constraint. Do we need to implement other
expressions, like `Cast(1 as float)`, `1 + 2` and so on ?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]