[ 
https://issues.apache.org/jira/browse/HIVE-29637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18086395#comment-18086395
 ] 

Denys Kuzmenko edited comment on HIVE-29637 at 6/5/26 2:55 PM:
---------------------------------------------------------------

WHERE ds = `HIVE_DEFAULT_PARTITION` is a Hive-specific quirk and not something 
I'd rely on semantically. __HIVE_DEFAULT_PARTITION is essentially Hive's 
internal representation for partition values that are NULL.

>From a data model perspective, the partition value is still NULL, which is why 
>WHERE ds IS NULL returns the same rows.

For Iceberg tables in particular, I'd strongly prefer thinking in terms of NULL 
values rather than `HIVE_DEFAULT_PARTITION`. Iceberg is an interoperable table 
format that can be accessed by multiple engines, and other engines are not 
expected to expose or depend on Hive's internal partition naming conventions. 
So I'd consider ds IS NULL the portable and semantically correct way to express 
the predicate.


was (Author: dkuzmenko):
WHERE ds = '_HIVE_DEFAULT_PARTITION{_}'{_} is a Hive-specific quirk and not 
something I'd rely on semantically. __HIVE_DEFAULT_PARTITION_ is essentially 
Hive's internal representation for partition values that are NULL.

>From a data model perspective, the partition value is still NULL, which is why 
>WHERE ds IS NULL returns the same rows.

For Iceberg tables in particular, I'd strongly prefer thinking in terms of NULL 
values rather than _{_}HIVE_DEFAULT_PARTITION{_}_. Iceberg is an interoperable 
table format that can be accessed by multiple engines, and other engines are 
not expected to expose or depend on Hive's internal partition naming 
conventions. So I'd consider ds IS NULL the portable and semantically correct 
way to express the predicate.

> Iceberg: Incorrect Results for NULL Predicate on Partition Column
> -----------------------------------------------------------------
>
>                 Key: HIVE-29637
>                 URL: https://issues.apache.org/jira/browse/HIVE-29637
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Denys Kuzmenko
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to