spark-instrumented-optimizer/sql/core
yi.wu 6cddda7847 [SPARK-31384][SQL] Fix NPE in OptimizeSkewedJoin
### What changes were proposed in this pull request?

1. Fix NPE in `OptimizeSkewedJoin`

2. prevent other potential NPE errors in AQE.

### Why are the changes needed?

When there's a `inputRDD` of a plan has 0 partition, rule `OptimizeSkewedJoin` can hit NPE error because this kind of RDD means a null `MapOutputStatistics` due to:

d98df7626b/sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala (L68-L69)

Thus, we should take care of such NPE errors in other places too.

### Does this PR introduce any user-facing change?

No

### How was this patch tested?

Added a test.

Closes #28153 from Ngone51/npe.

Authored-by: yi.wu <yi.wu@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
2020-04-10 08:16:48 +00:00
..
benchmarks [SPARK-31359][SQL] Speed up timestamps rebasing 2020-04-09 05:23:52 +00:00
src [SPARK-31384][SQL] Fix NPE in OptimizeSkewedJoin 2020-04-10 08:16:48 +00:00
v1.2/src [SPARK-31359][SQL] Speed up timestamps rebasing 2020-04-09 05:23:52 +00:00
v2.3/src [SPARK-31359][SQL] Speed up timestamps rebasing 2020-04-09 05:23:52 +00:00
pom.xml [SPARK-31021][SQL] Support MariaDB Kerberos login in JDBC connector 2020-04-09 09:20:02 -07:00