Github user viirya commented on the issue: https://github.com/apache/spark/pull/20043 Thanks. If we have forseen this need in near future, do we bother to combine them here and separate it again later? On Dec 22, 2017 12:02 PM, "Kazuaki Ishizaki" <notificati...@github.com> wrote: *@kiszk* commented on this pull request. ------------------------------ In sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ expressions/codegen/CodeGenerator.scala <https://github.com/apache/spark/pull/20043#discussion_r158426351>: > @@ -56,7 +56,36 @@ import org.apache.spark.util.{ParentClassLoader, Utils} * @param value A term for a (possibly primitive) value of the result of the evaluation. Not * valid if `isNull` is set to `true`. */ -case class ExprCode(var code: String, var isNull: String, var value: String) +case class ExprCode(var code: String, var isNull: ExprValue, var value: ExprValue) + + +// An abstraction that represents the evaluation result of [[ExprCode]]. +abstract class ExprValue In summary, I have no strong preference. In the future, we will want to distinguish Literal and Global for some optimizations. This <https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala#L121> is already one of optimizations for Literal. If this PR just focuses on classifying types between arguments and non-arguments, it is fine to combine Literal and Global. Then, another PR will separate one type into Literal and Global. â You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://github.com/apache/spark/pull/20043#discussion_r158426351>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAEM93ru1REIPBaOD4knd0BMTtWZt1TJks5tCynKgaJpZM4RJVpM> .
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org