maropu commented on a change in pull request #26604: [SPARK-29968][SQL] Remove 
the Predicate code from SparkPlan
URL: https://github.com/apache/spark/pull/26604#discussion_r348305635
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ##########
 @@ -56,6 +64,33 @@ trait Predicate extends Expression {
   override def dataType: DataType = BooleanType
 }
 
+/**
+ * The factory object for `BasePredicate`.
+ */
+object Predicate extends CodeGeneratorWithInterpretedFallback[Expression, 
BasePredicate] {
+
+  override protected def createCodeGeneratedObject(in: Expression): 
BasePredicate = {
+    GeneratePredicate.generate(in)
+  }
+
+  override protected def createInterpretedObject(in: Expression): 
BasePredicate = {
+    InterpretedPredicate(in)
+  }
+
+  /**
+   * Returns a BasePredicate for a bound Expression.
+   */
+  def create(expr: Expression): BasePredicate = {
+    create(expr)
+  }
+
 
 Review comment:
   Yea. ok.

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