gengliangwang commented on a change in pull request #35848:
URL: https://github.com/apache/spark/pull/35848#discussion_r828160530
##########
File path:
sql/core/src/test/resources/sql-tests/results/ansi/try_aggregates.sql.out
##########
@@ -0,0 +1,83 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 10
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (5), (10), (15) AS tab(col)
+-- !query schema
+struct<try_sum(col):bigint>
+-- !query output
+30
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (5.0), (10.0), (15.0) AS tab(col)
+-- !query schema
+struct<try_sum(col):decimal(13,1)>
+-- !query output
+30.0
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (NULL), (10), (15) AS tab(col)
+-- !query schema
+struct<try_sum(col):bigint>
+-- !query output
+25
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (NULL), (NULL) AS tab(col)
+-- !query schema
+struct<try_sum(col):double>
+-- !query output
+NULL
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (9223372036854775807L), (1L) AS tab(col)
+-- !query schema
+struct<try_sum(col):bigint>
+-- !query output
+NULL
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (98765432109876543210987654321098765432BD),
(98765432109876543210987654321098765432BD) AS tab(col)
+-- !query schema
+struct<try_sum(col):decimal(38,0)>
+-- !query output
+NULL
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (interval '1 months'), (interval '1 months')
AS tab(col)
+-- !query schema
+struct<try_sum(col):interval month>
+-- !query output
+0-2
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (interval '2147483647 months'), (interval '1
months') AS tab(col)
+-- !query schema
+struct<try_sum(col):interval month>
+-- !query output
+NULL
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (interval '1 seconds'), (interval '1 seconds')
AS tab(col)
+-- !query schema
+struct<try_sum(col):interval second>
+-- !query output
+0 00:00:02.000000000
+
+
+-- !query
+SELECT try_sum(col) FROM VALUES (interval '106751991 04:00:54.775808' DAY TO
SECOND), (interval '1 seconds') AS tab(col)
+-- !query schema
+struct<>
+-- !query output
+java.lang.ArithmeticException
+long overflow
Review comment:
I have updated the test case
--
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]