-
- Downloads
[SPARK-20412] Throw ParseException from visitNonOptionalPartitionSpec instead...
[SPARK-20412] Throw ParseException from visitNonOptionalPartitionSpec instead of returning null values. ## What changes were proposed in this pull request? If a partitionSpec is supposed to not contain optional values, a ParseException should be thrown, and not nulls returned. The nulls can later cause NullPointerExceptions in places not expecting them. ## How was this patch tested? A query like "SHOW PARTITIONS tbl PARTITION(col1='val1', col2)" used to throw a NullPointerException. Now it throws a ParseException. Author: Juliusz Sompolski <julek@databricks.com> Closes #17707 from juliuszsompolski/SPARK-20412.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala 4 additions, 1 deletion...ala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala 12 additions, 4 deletions.../apache/spark/sql/execution/command/DDLCommandSuite.scala
Loading
Please register or sign in to comment