andygrove commented on code in PR #42434:
URL: https://github.com/apache/spark/pull/42434#discussion_r1291414158


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala:
##########
@@ -80,11 +80,16 @@ trait ExpressionEvalHelper extends 
ScalaCheckDrivenPropertyChecks with PlanTestB
   }
 
   protected def checkEvaluation(
-      expression: => Expression, expected: Any, inputRow: InternalRow = 
EmptyRow): Unit = {
+      expression: => Expression, expected: Any, inputRow: InternalRow = 
EmptyRow,
+      withCodegen: Boolean = false): Unit = {
     // Make it as method to obtain fresh expression everytime.
     def expr = prepareEvaluation(expression)
     val catalystValue = CatalystTypeConverters.convertToCatalyst(expected)
-    checkEvaluationWithoutCodegen(expr, catalystValue, inputRow)
+    if (withCodegen) {
+      checkEvaluation(expr, catalystValue, inputRow)
+    } else {
+      checkEvaluationWithoutCodegen(expr, catalystValue, inputRow)
+    }
     checkEvaluationWithMutableProjection(expr, catalystValue, inputRow)
     if (GenerateUnsafeProjection.canSupport(expr.dataType)) {
       checkEvaluationWithUnsafeProjection(expr, catalystValue, inputRow)

Review Comment:
   Thanks. I reverted that change and confirmed that the test still fails if I 
remove the fix.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to