Copilot commented on code in PR #12981:
URL: https://github.com/apache/gluten/pull/12981#discussion_r3967976196
##########
backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenFunctionValidateSuite.scala:
##########
@@ -699,17 +699,10 @@ class GlutenFunctionValidateSuite extends
GlutenClickHouseWholeStageTransformerS
}
test("test common subexpression eliminate") {
+ // TODO: the expected operator counts at the call sites below only held on
Spark 3.3. Re-derive
+ // them for the supported versions and turn this back into a real
assertion.
def checkOperatorCount[T <: TransformSupport](count: Int)(df:
DataFrame)(implicit
- tag: ClassTag[T]): Unit = {
- if (spark33) {
- assert(
- getExecutedPlan(df).count(
- plan => {
- plan.getClass == tag.runtimeClass
- }) == count,
- s"executed plan: ${getExecutedPlan(df)}")
- }
- }
+ tag: ClassTag[T]): Unit = {}
Review Comment:
Same issue as the other empty checkOperatorCount helper: leaving it as a
no-op makes the surrounding tests appear to validate operator counts when they
don't. Consider making the tests explicitly ignored/pending until the expected
counts are re-derived, or reinstating assertions for supported Spark versions
with updated expectations.
##########
backends-clickhouse/src/test/scala/org/apache/gluten/execution/hive/GlutenClickHouseHiveTableSuite.scala:
##########
@@ -1038,25 +1038,13 @@ class GlutenClickHouseHiveTableSuite
spark.sql(
s"CREATE FUNCTION my_add as " +
s"'org.apache.hadoop.hive.contrib.udf.example.UDFExampleAdd2' USING
JAR '$jarUrl'")
- if (isSparkVersionLE("3.3")) {
- runQueryAndCompare("select MY_ADD(id, id+1) from range(10)")(
- checkGlutenPlan[ProjectExecTransformer])
- } else {
- runQueryAndCompare("select MY_ADD(id, id+1) from range(10)", noFallBack
= false)(_ => {})
- }
+ runQueryAndCompare("select MY_ADD(id, id+1) from range(10)", noFallBack =
false)(_ => {})
}
+ // TODO: the expected operator counts at the call sites below only held on
Spark 3.3. Re-derive
+ // them for the supported versions and turn this back into a real assertion.
def checkOperatorCount[T <: TransformSupport](count: Int)(df:
DataFrame)(implicit
- tag: ClassTag[T]): Unit = {
- if (spark33) {
- assert(
- getExecutedPlan(df).count(
- plan => {
- plan.getClass == tag.runtimeClass
- }) == count,
- s"executed plan: ${getExecutedPlan(df)}")
- }
- }
+ tag: ClassTag[T]): Unit = {}
Review Comment:
This helper now silently does nothing, which makes any call sites look like
they assert plan shape when they no longer do. To avoid a false sense of
coverage, consider either (a) converting the affected tests to explicit
`ignore(...)`/`pendingUntilFixed(...)` with the same rationale, or (b) updating
the helper to assert for supported Spark versions (even if counts differ) and
centralizing version-specific expectations in one place.
--
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]