tgravescs commented on code in PR #42434:
URL: https://github.com/apache/spark/pull/42434#discussion_r1290671657
##########
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:
we should document that withCodegen will evaluate it twice, once without and
once with.
--
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]