cloud-fan commented on code in PR #48436:
URL: https://github.com/apache/spark/pull/48436#discussion_r1815046834


##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/parser/DataTypeAstBuilder.scala:
##########
@@ -76,7 +76,7 @@ class DataTypeAstBuilder extends 
SqlBaseParserBaseVisitor[AnyRef] {
       case (TIMESTAMP_LTZ, Nil) => TimestampType
       case (STRING, Nil) =>
         typeCtx.children.asScala.toSeq match {
-          case Seq(_) => SqlApiConf.get.defaultStringType
+          case Seq(_) => DefaultStringType()

Review Comment:
   Whatever annotation we put into `StringType` (a subclass, a new flag, etc.) 
to indicate it's default, it can be a breaking change. I think it's safer to 
only add the annotation when needed (DDL commands).



##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/parser/DataTypeAstBuilder.scala:
##########
@@ -76,7 +76,7 @@ class DataTypeAstBuilder extends 
SqlBaseParserBaseVisitor[AnyRef] {
       case (TIMESTAMP_LTZ, Nil) => TimestampType
       case (STRING, Nil) =>
         typeCtx.children.asScala.toSeq match {
-          case Seq(_) => SqlApiConf.get.defaultStringType
+          case Seq(_) => DefaultStringType()

Review Comment:
   Whatever annotation we put into `StringType` (a subclass, a new flag, a 
different collation id, etc.) to indicate it's default, it can be a breaking 
change. I think it's safer to only add the annotation when needed (DDL 
commands).



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to