Github user gatorsmile commented on the issue:
https://github.com/apache/spark/pull/17277
Found a JIRA https://issues.apache.org/jira/browse/IMPALA-252 to explain
how IMPALA handles it.
**Static partition keys may not be NULL or the empty string**
So `INSERT INTO TABLE tbl PARTITION(part="") SELECT ...` will raise an
error.
**Dynamic partition keys may be empty or NULL**
So `INSERT INTO TABLE tbl PARTITION(part) SELECT ...`, `NULL` will work.
**Partitions with NULL or empty string keys are mapped to
`__HIVE_DEFAULT_PARTITION__`**
Whether the keys are `NULL` or "", both will be written to the same
`__HIVE_DEFAULT_PARTITION__` partition.
**Values read from the partitioned column in partition
__HIVE_DEFAULT_PARTITION__ are mapped back to NULL**
Here we deviate from Hive; Hive returns {{_HIVE_DEFAULT_PARTITION_ }} -
even if the partition column is of integer type. This finally crosses the line
of what we are willing to do to be compatible.
**ALTER TABLE [ADD|DROP] will reject partitions with NULL or empty
partition keys**
You cannot create or delete default partitions manually.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]