-
- Downloads
[SPARK-20359][SQL] Avoid unnecessary execution in EliminateOuterJoin...
[SPARK-20359][SQL] Avoid unnecessary execution in EliminateOuterJoin optimization that can lead to NPE Avoid necessary execution that can lead to NPE in EliminateOuterJoin and add test in DataFrameSuite to confirm NPE is no longer thrown ## What changes were proposed in this pull request? Change leftHasNonNullPredicate and rightHasNonNullPredicate to lazy so they are only executed when needed. ## How was this patch tested? Added test in DataFrameSuite that failed before this fix and now succeeds. Note that a test in catalyst project would be better but i am unsure how to do this. Please review http://spark.apache.org/contributing.html before opening a pull request. Author: Koert Kuipers <koert@tresata.com> Closes #17660 from koertkuipers/feat-catch-npe-in-eliminate-outer-join.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/joins.scala 2 additions, 2 deletions...scala/org/apache/spark/sql/catalyst/optimizer/joins.scala
- sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala 10 additions, 0 deletions.../src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
Please register or sign in to comment