Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/20043#discussion_r158426351 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala --- @@ -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 --- End diff -- 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`.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org