mgaido91 commented on issue #20350: [SPARK-23179][SQL] Support option to throw exception if overflow occurs during Decimal arithmetic URL: https://github.com/apache/spark/pull/20350#issuecomment-506230897 @mickjermsurawong-stripe let me answer to your two comments separately: > At encoder level (thanks you for the addition on RowEncoder in this PR). We may similarly need it for consistency here at SerializerBuildHelper Not really, when we serialize a SQL decimal to a Java/Scala BigDecimal, we cannot have overflow. So this patch/case doesn't apply (as you can see, there is not even a `CheckOverflow` there). > When we use agg(sum) the aggregation Thanks for pointing this out! Actually this is a weird operator, because it does throw an exception on overflow in interpreted mode, while in codegen it doesn't. Moreover, it throw a `IllegalArgumentException`, instead of the `ArithmeticException` Since this is a weird behavior of the operator itself, I'd prefer having a PR targeting that specific operator and addressing its behavior totally, since it need to be revisited carefully. Are there concerns on this plan?
---------------------------------------------------------------- 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]
