[GitHub] [spark] maropu commented on a change in pull request #28604: [SPARK-29854][SQL][TESTS] Add tests to check lpad/rpad throw an exception for invalid length input

2020-05-21 Thread GitBox


maropu commented on a change in pull request #28604:
URL: https://github.com/apache/spark/pull/28604#discussion_r429042439



##
File path: sql/core/src/test/resources/sql-tests/inputs/string-functions.sql
##
@@ -48,4 +48,8 @@ SELECT trim(LEADING 'xyz' FROM 'zzzytestxyz');
 SELECT trim(LEADING 'xy' FROM 'xyxXxyLAST WORD');
 SELECT trim(TRAILING 'xyz' FROM 'testxxzx');
 SELECT trim(TRAILING 'xyz' FROM 'xyztestxxzx');
-SELECT trim(TRAILING 'xy' FROM 'TURNERyxXxy');
\ No newline at end of file
+SELECT trim(TRAILING 'xy' FROM 'TURNERyxXxy');
+
+-- Check lpad/rpad throw an exception for invalid length input

Review comment:
   Ur, my bad. It looks better. I'll update it.





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:
us...@infra.apache.org



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] maropu commented on a change in pull request #28604: [SPARK-29854][SQL][TESTS] Add tests to check lpad/rpad throw an exception for invalid length input

2020-05-21 Thread GitBox


maropu commented on a change in pull request #28604:
URL: https://github.com/apache/spark/pull/28604#discussion_r429014787



##
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##
@@ -49,6 +49,24 @@ class SQLQuerySuite extends QueryTest with 
SharedSparkSession with AdaptiveSpark
 
   setupTestData()
 
+  test("lpad/rpad should throw an exception for invalid length input if the 
ANSI mode enabled") {

Review comment:
   ok





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:
us...@infra.apache.org



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org