cloud-fan commented on code in PR #36698:
URL: https://github.com/apache/spark/pull/36698#discussion_r884487459
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala:
##########
@@ -313,7 +379,7 @@ object BinaryArithmetic {
case class Add(
left: Expression,
right: Expression,
- failOnError: Boolean = SQLConf.get.ansiEnabled) extends BinaryArithmetic {
+ failOnError: Boolean = SQLConf.get.ansiEnabled) extends DecimalArithmetic {
Review Comment:
This looks a bit weird. I think supporting decimal is an additional ability,
and we'd better use a mix-in trait, e.g. `extends BinaryArithmetic with
DecimalArithmetic`
```
trait DecimalArithmetic { self: BinaryArithmetic
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]