Skip to content

HIVE-29637: Iceberg: Incorrect Results for NULL Predicate on Partitio…#6515

Open
deniskuzZ wants to merge 1 commit into
apache:masterfrom
deniskuzZ:HIVE-29637
Open

HIVE-29637: Iceberg: Incorrect Results for NULL Predicate on Partitio…#6515
deniskuzZ wants to merge 1 commit into
apache:masterfrom
deniskuzZ:HIVE-29637

Conversation

@deniskuzZ
Copy link
Copy Markdown
Member

@deniskuzZ deniskuzZ commented May 29, 2026

…n Column

What changes were proposed in this pull request?

  1. IcebergTableUtil.makeSpecFromName() — a new helper that builds a Hive-compatible partition spec map from Iceberg's PartitionData. When a partition field value is null, it maps it to HIVE_DEFAULT_PARTITION instead of the literal string "null".
  2. PartExprEvalUtils.evalExprWithPart() — when evaluating partition predicate expressions, values equal to null or HIVE_DEFAULT_PARTITION are now passed as actual Java null rather than being
    converted through ObjectInspectorConverters.

Why are the changes needed?

Queries with WHERE <partition_col> IS NULL on Iceberg tables returned incorrect results (empty result set).

Does this PR introduce any user-facing change?

No

How was this patch tested?

mvn test -Dtest=TestIcebergCliDriver -Dqfile=iceberg_isnull_partition_pruning.q

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants