jerqi opened a new pull request #34589:
URL: https://github.com/apache/spark/pull/34589
### What changes were proposed in this pull request?
Add `throws IOException` to `consumeFullOuterJoinRow` in ShuffledHashJoinExec
### Why are the changes needed?
If we don't have this patch, when the dataframes that have aggregate and
join at the same time use `wholeStageCodegen`, the dataframes will throw a
`CompileException`.
For example:
```scala
val df1 = spark.range(5).select($"id".as("k1"))
val df2 = spark.range(10).select($"id".as("k2"))
df1.join(df2.hint("SHUFFLE_HASH"), $"k1" === $"k2", "full_outer").count()
```
this query will throw Exception is as follows:
```
23:28:19.079 ERROR
org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator: failed to
compile: org.codehaus.commons.compiler.CompileException: File 'generated.java',
Line 175, Column 1: Thrown exception of type "java.io.IOException" is neither
caught by a "try...catch" block nor declared in the "throws" clause of the
declaring function
org.codehaus.commons.compiler.CompileException: File 'generated.java', Line
175, Column 1: Thrown exception of type "java.io.IOException" is neither caught
by a "try...catch" block nor declared in the "throws" clause of the declaring
function
at
org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:12021)
at
org.codehaus.janino.UnitCompiler.checkThrownException(UnitCompiler.java:9801)
at
org.codehaus.janino.UnitCompiler.checkThrownExceptions(UnitCompiler.java:9720)
at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:9163)
at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:5055)
```
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Add a new UT
--
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]