dongjoon-hyun commented on a change in pull request #31793:
URL: https://github.com/apache/spark/pull/31793#discussion_r591082351
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -869,6 +870,26 @@ class AdaptiveQueryExecSuite
}
}
+ test("SPARK-34682: CustomShuffleReaderExec operating on canonicalized plan")
{
+ withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true") {
+ val (_, adaptivePlan) = runAdaptiveAndVerifyResult(
+ "SELECT key FROM testData GROUP BY key")
+ val readers = collect(adaptivePlan) {
+ case r: CustomShuffleReaderExec => r
+ }
+ assert(readers.length == 1)
+ val reader = readers.head
+ val c = reader.canonicalized.asInstanceOf[CustomShuffleReaderExec]
+ // we can't just call execute() because that has separate checks for
canonicalized plans
+ val doExecute = c.getClass.getMethod("doExecute")
+ doExecute.setAccessible(true)
+ val ex = intercept[InvocationTargetException] {
Review comment:
Thank you for making a test case, @andygrove .
However, this doesn't match with your PR description. This should be
`IllegalStateException`.
```
After fixing this regression I saw:
> java.lang.IllegalStateException: operating on canonicalized plan
```
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -18,6 +18,7 @@
package org.apache.spark.sql.execution.adaptive
import java.io.File
+import java.lang.reflect.InvocationTargetException
Review comment:
Please remove this since this is not the expected exception.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]