viirya commented on a change in pull request #25827: [SPARK-29128][SQL] Split 
predicate code in OR expressions
URL: https://github.com/apache/spark/pull/25827#discussion_r326812168
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
 ##########
 @@ -1020,6 +1020,45 @@ class CodegenContext extends Logging {
     genCodes
   }
 
+  /**
+   * Defines an independent function for a given expression and returns a 
caller-side code
+   * for the function as `ExprCode`.
+   */
+  def defineSingleSplitFunction(
+      expr: Expression,
+      ev: ExprCode,
+      funcNameOption: Option[String] = None,
+      inputVarsOption: Option[Seq[VariableValue]] = None): ExprCode = {
+    val inputVars = 
inputVarsOption.getOrElse(getLocalInputVariableValues(this, expr).toSeq)
 
 Review comment:
   Actually, I am not sure if getLocalInputVariableValues is totally ok to 
extract all input variables from an expr. This is what I want to do when I was 
changing codegen. I remember not all expressions are changed to expose input 
variables information. I did the change but stoped in the middle because the 
community has different idea other than this string based framework.

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