maropu commented on a change in pull request #25189: [SPARK-28435][SQL] Support 
cast StringType to IntervalType for SQL interface
URL: https://github.com/apache/spark/pull/25189#discussion_r305207265
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/DataTypeParserSuite.scala
 ##########
 @@ -58,6 +58,7 @@ class DataTypeParserSuite extends SparkFunSuite {
   checkDataType("varchAr(20)", StringType)
   checkDataType("cHaR(27)", StringType)
   checkDataType("BINARY", BinaryType)
+  checkDataType("interval", CalendarIntervalType)
 
 Review comment:
   nit: This change accepts an interval keyword in a schema string, so could 
you add tests in `StructTypeSuite`. too?
   ```
   scala> org.apache.spark.sql.types.StructType.fromDDL("a interval")
   res0: org.apache.spark.sql.types.StructType = 
StructType(StructField(a,CalendarIntervalType,true))
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to