You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2023/08/10 21:50:00 UTC
[GitHub] [spark] andygrove commented on a diff in pull request #42434: [SPARK-43063][SQL][FOLLOWUP] Add a space between -> and value when first value is null
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org