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 2019/12/25 03:13:34 UTC
[GitHub] [spark] 07ARB commented on a change in pull request #26477:
[SPARK-29776][SQL] rpad returning invalid value when parameter is empty
07ARB commented on a change in pull request #26477: [SPARK-29776][SQL] rpad returning invalid value when parameter is empty
URL: https://github.com/apache/spark/pull/26477#discussion_r361246915
##########
File path: sql/core/src/test/resources/sql-tests/results/postgreSQL/strings.sql.out
##########
@@ -907,7 +907,7 @@ SELECT rpad('hi', 5, '')
-- !query 110 schema
struct<rpad(hi, 5, ):string>
-- !query 110 output
-hi
+NULL
Review comment:
@maropu , yes i know but the correct behaviour as per the description of rpad it should return NULL for empty pad.
Mysql : rpad ('hi', 5, '') => NULL
Hive : rpad ('hi', 5, '') => NULL
Postgresql : rpad ('hi', 5, '') => hi
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org