mgaido91 edited a comment on issue #20350: [SPARK-23179][SQL] Support option to 
throw exception if overflow occurs
URL: https://github.com/apache/spark/pull/20350#issuecomment-504573616
 
 
   @mickjermsurawong-stripe thanks for your comment. I am updating this PR 
resolving the conflicts and I hope that your feedback will help this PR moving 
forward.
   
   As far as your question is regarded, you may consider adding an 
`AssertNotNull` to the output of the decoding, in order to get an exception in 
case that conversion fails. This is not really feasible - of course - if your 
input `BigDecimal` can contain null, ie. if it is an `Option[BigDecimal]` you 
want to get in SQL. Another option which may work for you is what is done in 
this PR now, after my update, in the `RowEncoder`. The check there may solve 
your issue too.

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