dongjoon-hyun commented on a change in pull request #25331: [SPARK-27768][SQL]
Infinity, -Infinity, NaN should be recognized in a case insensitive manner.
URL: https://github.com/apache/spark/pull/25331#discussion_r309913686
##########
File path:
sql/core/src/test/resources/sql-tests/inputs/pgSQL/aggregates_part1.sql
##########
@@ -69,6 +68,15 @@ FROM (VALUES ('Infinity'), ('Infinity')) v(x);
SELECT avg(CAST(x AS DOUBLE)), var_pop(CAST(x AS DOUBLE))
FROM (VALUES ('-Infinity'), ('Infinity')) v(x);
+SELECT avg(CAST(x AS DOUBLE)), var_pop(CAST(x AS DOUBLE))
+FROM (VALUES (CAST('1' AS DOUBLE)), (CAST('infinity' AS DOUBLE))) v(x);
+SELECT avg(CAST(x AS DOUBLE)), var_pop(CAST(x AS DOUBLE))
+FROM (VALUES ('infinity'), ('1')) v(x);
+SELECT avg(CAST(x AS DOUBLE)), var_pop(CAST(x AS DOUBLE))
+FROM (VALUES ('infinity'), ('infinity')) v(x);
+SELECT avg(CAST(x AS DOUBLE)), var_pop(CAST(x AS DOUBLE))
+FROM (VALUES ('-infinity'), ('infinity')) v(x);
+
Review comment:
Please replace line 63~70 with this.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]