ArnavBalyan commented on code in PR #9096:
URL: https://github.com/apache/incubator-gluten/pull/9096#discussion_r2009593650


##########
gluten-ut/common/src/test/scala/org/apache/spark/sql/GlutenTestsTrait.scala:
##########
@@ -138,13 +138,7 @@ trait GlutenTestsTrait extends GlutenTestsCommonTrait {
       glutenCheckExpression(expr, expected, inputRow)
     } else {
       logWarning(s"The status of this unit test is not guaranteed.")
-      val catalystValue = CatalystTypeConverters.convertToCatalyst(expected)
-      checkEvaluationWithoutCodegen(expr, catalystValue, inputRow)
-      checkEvaluationWithMutableProjection(expr, catalystValue, inputRow)
-      if (GenerateUnsafeProjection.canSupport(expr.dataType)) {
-        checkEvaluationWithUnsafeProjection(expr, catalystValue, inputRow)
-      }
-      checkEvaluationWithOptimization(expr, catalystValue, inputRow)
+      checkEvaluationWithFallback(expression, expected, inputRow)

Review Comment:
   The `checkEvaluationWithFallback` only calls checkEvaluationWithoutCodegen 
and checkEvaluationWithMutableProjection etc. Avoiding the 
`glutenCheckExpression`. Moved this logic to the new function to prevent code 
duplication.
   With this change, a test can directly call checkEvaluationWithFallback and 
avoid the glutenCheckExpression when not supported. (Have done for the UT added)



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