Description
When there's a inputRDD of a plan with 0 partitions, rule OptimizeSkewedJoin can hit NPE.
The issue can be reproduced by below test:
withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true", SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1") { withTempView("t2") { // create DataFrame with 0 partition spark.createDataFrame(sparkContext.emptyRDD[Row], new StructType().add("b", IntegerType)) .createOrReplaceTempView("t2") // should run successfully without NPE runAdaptiveAndVerifyResult("SELECT * FROM testData2 t1 left semi join t2 ON t1.a=t2.b") } }
Attachments
Issue Links
- links to