iRakson commented on a change in pull request #26933: [SPARK-30292][SQL]Throw 
Exception when invalid string is cast to numeric type in ANSI mode
URL: https://github.com/apache/spark/pull/26933#discussion_r364231480
 
 

 ##########
 File path: 
sql/core/src/test/resources/sql-tests/results/postgreSQL/window_part4.sql.out
 ##########
 @@ -498,10 +498,7 @@ SELECT a, b,
        SUM(b) OVER(ORDER BY A ROWS BETWEEN 1 PRECEDING AND CURRENT ROW)
 FROM (VALUES(1,1),(2,2),(3,(cast('nan' as int))),(4,3),(5,4)) t(a,b)
 -- !query 38 schema
-struct<a:int,b:int,sum(b) OVER (ORDER BY A ASC NULLS FIRST ROWS BETWEEN 1 
PRECEDING AND CURRENT ROW):bigint>
+struct<>
 -- !query 38 output
-1      1       1
-2      2       3
-3      NULL    2
-4      3       3
-5      4       7
+org.apache.spark.sql.AnalysisException
+failed to evaluate expression CAST('nan' AS INT): invalid input syntax for 
type numeric: nan; line 3 pos 6
 
 Review comment:
   I will check this issue.

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

Reply via email to