dongjoon-hyun commented on a change in pull request #25189: [SPARK-28435][SQL] 
Add support accepting the interval keyword in the schema string
URL: https://github.com/apache/spark/pull/25189#discussion_r306606281
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/results/cast.sql.out
 ##########
 @@ -271,3 +271,19 @@ Extended Usage:
 
 Function: boolean
 Usage: boolean(expr) - Casts the value `expr` to the target data type 
`boolean`.
+
+
+-- !query 33
+SELECT CAST('interval 3 month 1 hour' AS interval)
+-- !query 33 schema
+struct<CAST(interval 3 month 1 hour AS INTERVAL):interval>
+-- !query 33 output
+interval 3 months 1 hours
+
+
+-- !query 34
+SELECT CAST(interval 3 month 1 hour AS string)
+-- !query 34 schema
+struct<CAST(interval 3 months 1 hours AS STRING):string>
 
 Review comment:
   Ur, this is irrelevant to this PR.
   Is this column name a bug? `1 hours` instead of `1 hour`?

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

Reply via email to