andygrove commented on code in PR #42434:
URL: https://github.com/apache/spark/pull/42434#discussion_r1290716061
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala:
##########
@@ -80,11 +80,15 @@ 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) {
Review Comment:
I updated the code so that it only evaluates once, either with or without
codegen
--
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]