beliefer commented on a change in pull request #33665:
URL: https://github.com/apache/spark/pull/33665#discussion_r687467571
##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/timestamp.sql.out
##########
@@ -107,6 +107,40 @@ java.time.DateTimeException
The fraction of sec must be zero. Valid range is [0, 60].
+-- !query
+SELECT make_timestamp(1, 1, 1, 1, 1, 1)
+-- !query schema
+struct<make_timestamp(1, 1, 1, 1, 1, 1):timestamp>
+-- !query output
+0001-01-01 01:01:01
+
+
+-- !query
+SELECT make_timestamp(1, 1, 1, 1, 1, 60)
+-- !query schema
+struct<make_timestamp(1, 1, 1, 1, 1, 60):timestamp>
+-- !query output
+0001-01-01 01:02:00
+
+
+-- !query
+SELECT make_timestamp(1, 1, 1, 1, 1, 61)
+-- !query schema
+struct<>
+-- !query output
+java.time.DateTimeException
+Invalid value for SecondOfMinute (valid values 0 - 59): 61
+
+
+-- !query
+SELECT make_timestamp(1, 1, 1, 1, 1, null)
+-- !query schema
+struct<>
+-- !query output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'make_timestamp(1, 1, 1, 1, 1, NULL)' due to data type
mismatch: argument 6 requires (decimal(8,6) or int) type, however, 'NULL' is of
void type.; line 1 pos 7
Review comment:
Let's add NullType support.
##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/timestamp.sql.out
##########
@@ -107,6 +107,40 @@ java.time.DateTimeException
The fraction of sec must be zero. Valid range is [0, 60].
+-- !query
+SELECT make_timestamp(1, 1, 1, 1, 1, 1)
+-- !query schema
+struct<make_timestamp(1, 1, 1, 1, 1, 1):timestamp>
+-- !query output
+0001-01-01 01:01:01
+
+
+-- !query
+SELECT make_timestamp(1, 1, 1, 1, 1, 60)
+-- !query schema
+struct<make_timestamp(1, 1, 1, 1, 1, 60):timestamp>
+-- !query output
+0001-01-01 01:02:00
+
+
+-- !query
+SELECT make_timestamp(1, 1, 1, 1, 1, 61)
+-- !query schema
+struct<>
+-- !query output
+java.time.DateTimeException
+Invalid value for SecondOfMinute (valid values 0 - 59): 61
+
+
+-- !query
+SELECT make_timestamp(1, 1, 1, 1, 1, null)
+-- !query schema
+struct<>
+-- !query output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'make_timestamp(1, 1, 1, 1, 1, NULL)' due to data type
mismatch: argument 6 requires (decimal(8,6) or int) type, however, 'NULL' is of
void type.; line 1 pos 7
Review comment:
Let's add `NullType` support.
--
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]