Skip to content
Snippets Groups Projects
Commit c9e6035e authored by Juliusz Sompolski's avatar Juliusz Sompolski Committed by Wenchen Fan
Browse files

[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.
parent 34767997
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment