Skip to content

[Bug] Hive returns zero rows for partition values containing escaped characters #9077

Description

@thswlsqls

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version
master @ a5e87eb (2.1-SNAPSHOT)

Compute Engine
Hive

Minimal reproduce step

  1. Create a Paimon table with metastore.partitioned-table = true and a string partition column pt.
  2. Write pt = '2026-01-01 00:00'. PartitionPathUtils.escapePathName() makes the directory pt=2026-01-01 00%3A00.
  3. From Hive: SELECT * FROM t WHERE pt = '2026-01-01 00:00'.

HiveSplitGenerator.createPartitionPredicate() (.../hive/utils/HiveSplitGenerator.java line 131) splits the Hive input dir by / and = by hand and never unescapes, so the predicate uses 2026-01-01 00%3A00.

What doesn't meet your expectations?
Expected the committed rows. Actual: zero splits and zero rows, with no exception — a silent wrong result.

Anything else?
This is the only remaining production site that parses a partition path by hand. Every other site, including HiveUtils.extractTagName() in the same module, uses PartitionPathUtils.extractPartitionSpecFromPath(), which unescapes.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions