Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/6660#discussion_r31778510
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
---
@@ -33,84 +32,36 @@ class IntegerHashSet extends
org.apache.spark.util.collection.OpenHashSet[Int]
class LongHashSet extends
org.apache.spark.util.collection.OpenHashSet[Long]
/**
- * A base class for generators of byte code to perform expression
evaluation. Includes a set of
- * helpers for referring to Catalyst types and building trees that perform
evaluation of individual
- * expressions.
+ * Java source for evaluating an [[Expression]] given a [[Row]] of input.
+ *
+ * @param code The sequence of statements required to evaluate the
expression.
+ * @param nullTerm A term that holds a boolean value representing whether
the expression evaluated
+ * to null.
+ * @param primitiveTerm A term for a possible primitive value of the
result of the evaluation. Not
+ * valid if `nullTerm` is set to `true`.
+ * @param objectTerm A possibly boxed version of the result of evaluating
this expression.
*/
-abstract class CodeGenerator[InType <: AnyRef, OutType <: AnyRef] extends
Logging {
-
- protected val rowType = classOf[Row].getName
- protected val stringType = classOf[UTF8String].getName
- protected val decimalType = classOf[Decimal].getName
- protected val exprType = classOf[Expression].getName
- protected val mutableRowType = classOf[MutableRow].getName
- protected val genericMutableRowType = classOf[GenericMutableRow].getName
-
- private val curId = new java.util.concurrent.atomic.AtomicInteger()
+case class EvaluatedExpression(var code: Code,
--- End diff --
GeneratedExpressionCode?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]