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/02/24 19:30:17 UTC

[GitHub] [spark] peter-toth commented on a change in pull request #27656: [SPARK-30898][SQL] The behavior of MakeDecimal should not depend on SQLConf.get

peter-toth commented on a change in pull request #27656: [SPARK-30898][SQL] The behavior of MakeDecimal should not depend on SQLConf.get
URL: https://github.com/apache/spark/pull/27656#discussion_r383468170
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/decimalExpressions.scala
 ##########
 @@ -45,9 +45,15 @@ case class UnscaledValue(child: Expression) extends UnaryExpression {
  * Note: this expression is internal and created only by the optimizer,
  * we don't need to do type check for it.
  */
-case class MakeDecimal(child: Expression, precision: Int, scale: Int) extends UnaryExpression {
+case class MakeDecimal(
+    child: Expression,
+    precision: Int,
+    scale: Int,
+    nullOnOverflow: Boolean) extends UnaryExpression {
 
-  private val nullOnOverflow = !SQLConf.get.ansiEnabled
 
 Review comment:
   In my understanding what we want to avoid is that `nullOnOverflow` changes during expression transformation: https://github.com/apache/spark/pull/27683#issuecomment-590317541

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


With regards,
Apache Git Services

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