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 2020/05/17 02:22:08 UTC

[GitHub] [spark] 07ARB opened a new pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

07ARB opened a new pull request #27024:
URL: https://github.com/apache/spark/pull/27024


   ### What changes were proposed in this pull request?
   lpad and rpad built in function should throw Error or Exception for invalid length value Instead of empty string.
   
   ### Why are the changes needed?
   We should throw Error or Exception message, if user trying to perform LPAD/RPAD operation using invalid argument.
   
   ```
   SELECT lpad('hi', 'ankit', '?') => ""   <previous behaviours>
   SELECT lpad('hi', 'ankit', '?') => "Error in query: Invalid argument, TypeCheckFailure(argument 2 requires int type, however, ''ankit'' is of string type.);"   <After this PR>
   
   SELECT rpad('hi', 'raj', '?') => ""   <previous behaviours>
   SELECT lpad('hi', 'raj', '?') => "Error in query: Invalid argument, TypeCheckFailure(argument 2 requires int type, however, ''raj'' is of string type.);"   <After this PR>
   ```
   
   
   ### Does this PR introduce any user-facing change?
   YES
   ![Screenshot 2019-12-27 at 4 09 46 PM](https://user-images.githubusercontent.com/8948111/71514275-e8577180-28c3-11ea-9d0b-9b4f3027ddeb.png)
   
   ![Screenshot 2019-12-27 at 4 15 55 PM](https://user-images.githubusercontent.com/8948111/71514356-37050b80-28c4-11ea-87ab-0406db6d720e.png)
   ![Screenshot 2019-12-27 at 4 16 52 PM](https://user-images.githubusercontent.com/8948111/71514395-674caa00-28c4-11ea-91dc-37c253f451b0.png)
   
   ![Screenshot 2019-12-27 at 4 17 05 PM](https://user-images.githubusercontent.com/8948111/71514392-5dc34200-28c4-11ea-94bd-70d439c5216f.png)
   
   
   ### How was this patch tested?
   Added new test case to check invalid length value. 
   


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



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


[GitHub] [spark] maropu commented on pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

Posted by GitBox <gi...@apache.org>.
maropu commented on pull request #27024:
URL: https://github.com/apache/spark/pull/27024#issuecomment-629876652


   @07ARB  Are you still here? Could you update this PR based on the @cloud-fan suggestion above? 


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



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


[GitHub] [spark] AmplabJenkins commented on pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #27024:
URL: https://github.com/apache/spark/pull/27024#issuecomment-629733258


   Can one of the admins verify this patch?


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



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


[GitHub] [spark] cloud-fan commented on pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #27024:
URL: https://github.com/apache/spark/pull/27024#issuecomment-629732771


   This behavior LGTM under the ansi mode. We should also update `docs/sql-ref-ansi-compliance.md`


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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #27024:
URL: https://github.com/apache/spark/pull/27024#issuecomment-629732784


   Can one of the admins verify this patch?


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



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


[GitHub] [spark] github-actions[bot] closed pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #27024:
URL: https://github.com/apache/spark/pull/27024


   


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



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


[GitHub] [spark] AmplabJenkins commented on pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #27024:
URL: https://github.com/apache/spark/pull/27024#issuecomment-629732784


   Can one of the admins verify this patch?


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



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


[GitHub] [spark] github-actions[bot] commented on pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #27024:
URL: https://github.com/apache/spark/pull/27024#issuecomment-629557039


   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


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



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


[GitHub] [spark] maropu closed pull request #27024: [SPARK-29854]lpad and rpad built in function should throw Error or Exception for invalid length value

Posted by GitBox <gi...@apache.org>.
maropu closed pull request #27024:
URL: https://github.com/apache/spark/pull/27024


   


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



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