gengliangwang commented on a change in pull request #33666:
URL: https://github.com/apache/spark/pull/33666#discussion_r685262728



##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/timestamp.sql.out
##########
@@ -590,6 +590,58 @@ org.apache.spark.sql.AnalysisException
 cannot resolve '1 + (- INTERVAL '02' SECOND)' due to data type mismatch: 
argument 1 requires (timestamp or timestamp without time zone) type, however, 
'1' is of int type.; line 1 pos 7
 
 
+-- !query
+select '2011-11-11 11:11:11' - date'2011-11-11'
+-- !query schema
+struct<(2011-11-11 11:11:11 - DATE '2011-11-11'):interval day>
+-- !query output
+0 00:00:00.000000000
+
+
+-- !query
+select '2011-11-11 11:11:11' - timestamp'2011-11-11 11:11:10'
+-- !query schema
+struct<>
+-- !query output
+org.apache.spark.sql.AnalysisException
+cannot resolve '('2011-11-11 11:11:11' - TIMESTAMP '2011-11-11 11:11:10')' due 
to data type mismatch: argument 1 requires (timestamp or timestamp without time 
zone) type, however, ''2011-11-11 11:11:11'' is of string type.; line 1 pos 7

Review comment:
       We don't have a rule for this one




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