mgaido91 commented on a change in pull request #25010: [SPARK-28201][SQL] 
Revisit MakeDecimal behavior on overflow
URL: https://github.com/apache/spark/pull/25010#discussion_r298805308
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/decimalExpressions.scala
 ##########
 @@ -46,19 +47,35 @@ case class UnscaledValue(child: Expression) extends 
UnaryExpression {
  */
 case class MakeDecimal(child: Expression, precision: Int, scale: Int) extends 
UnaryExpression {
 
+  private val nullOnOverflow = SQLConf.get.decimalOperationsNullOnOverflow
+  private lazy val doEval = if (nullOnOverflow) {
 
 Review comment:
   Usually the focus on perf is a bit less stressed in the evaluated code since 
we should never execute it, while it is critical for the codegen case. I don't 
have a strong preference. I can go with your suggestion, thanks.

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