You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/22 12:38:44 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #34681: [SPARK-37438][SQL] ANSI mode: Use store assignment rules for resolving function invocation
cloud-fan commented on a change in pull request #34681:
URL: https://github.com/apache/spark/pull/34681#discussion_r754234230
##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/string-functions.sql.out
##########
@@ -545,37 +539,33 @@ AABB
-- !query
SELECT lpad('abc', 5, x'57')
-- !query schema
-struct<>
+struct<lpad(abc, 5, X'57'):string>
-- !query output
-org.apache.spark.sql.AnalysisException
-cannot resolve 'lpad('abc', 5, X'57')' due to data type mismatch: argument 3 requires string type, however, 'X'57'' is of binary type.; line 1 pos 7
+WWabc
-- !query
SELECT lpad(x'57', 5, 'abc')
-- !query schema
-struct<>
+struct<lpad(X'57', 5, abc):string>
-- !query output
-org.apache.spark.sql.AnalysisException
-cannot resolve 'lpad(X'57', 5, 'abc')' due to data type mismatch: argument 1 requires string type, however, 'X'57'' is of binary type.; line 1 pos 7
+abcaW
-- !query
SELECT rpad('abc', 5, x'57')
-- !query schema
-struct<>
+struct<rpad(abc, 5, X'57'):string>
-- !query output
-org.apache.spark.sql.AnalysisException
-cannot resolve 'rpad('abc', 5, X'57')' due to data type mismatch: argument 3 requires string type, however, 'X'57'' is of binary type.; line 1 pos 7
+abcWW
-- !query
SELECT rpad(x'57', 5, 'abc')
-- !query schema
-struct<>
+struct<rpad(X'57', 5, abc):string>
-- !query output
-org.apache.spark.sql.AnalysisException
-cannot resolve 'rpad(X'57', 5, 'abc')' due to data type mismatch: argument 1 requires string type, however, 'X'57'' is of binary type.; line 1 pos 7
+Wabca
Review comment:
does this sql test file still have differences between ansi and non-ansi?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org