You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/06/13 01:08:18 UTC

[GitHub] [spark] gengliangwang commented on a diff in pull request #36811: [SPARK-39451][SQL] Support casting intervals to integrals in ANSI mode

gengliangwang commented on code in PR #36811:
URL: https://github.com/apache/spark/pull/36811#discussion_r895261353


##########
sql/core/src/test/resources/sql-tests/inputs/cast.sql:
##########
@@ -104,3 +104,15 @@ select cast('a' as timestamp_ntz);
 
 select cast(cast('inf' as double) as timestamp);
 select cast(cast('inf' as float) as timestamp);
+
+-- cast ANSI intervals to numerics
+select cast(interval '1' year as tinyint);
+select cast(interval '-10-2' year to month as smallint);
+select cast(interval '1000' month as int);
+select cast(interval -'10.123456' second as tinyint);
+select cast(interval '23:59:59' hour to second as smallint)

Review Comment:
   add `;` at the end of line?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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