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 2021/04/21 10:18:00 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #32267: [SPARK-35170][SQL] Extend `BinaryOperator` by `SubtractDates` and `SubtractTimestamps`

MaxGekk commented on a change in pull request #32267:
URL: https://github.com/apache/spark/pull/32267#discussion_r617401582



##########
File path: sql/core/src/test/resources/sql-tests/results/typeCoercion/native/promoteStrings.sql.out
##########
@@ -198,15 +198,16 @@ SELECT '1' - cast('2017-12-11 09:30:00.0' as timestamp) FROM t
 struct<>
 -- !query output
 org.apache.spark.sql.AnalysisException
-cannot resolve '('1' - CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' due to data type mismatch: argument 1 requires timestamp type, however, ''1'' is of string type.; line 1 pos 7
+cannot resolve '('1' - CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' due to data type mismatch: differing types in '('1' - CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' (string and timestamp).; line 1 pos 7
 
 
 -- !query
 SELECT '1' - cast('2017-12-11 09:30:00' as date)        FROM t
 -- !query schema
-struct<(1 - CAST(2017-12-11 09:30:00 AS DATE)):day-time interval>
+struct<>
 -- !query output
-NULL
+org.apache.spark.sql.AnalysisException

Review comment:
       @cloud-fan @gengliangwang Are we ok to change the behavior?




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



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