Skip to content

[hive] Normalize column comments written to Hive metastore - #9073

Merged
JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/hive-catalog-normalize-column-comment
Aug 6, 2026
Merged

[hive] Normalize column comments written to Hive metastore#9073
JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/hive-catalog-normalize-column-comment

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #9072

Tests

  • Added HiveCatalogTest#testCreateTableWithLongColumnComment (300-character comment with a newline: create succeeds, the mirror is truncated to 255 characters, Paimon keeps the original) and #testCreateTableWithLongPartitionKeyComment.
  • mvn -pl paimon-hive/paimon-hive-catalog -DfailIfNoTests=false clean install on JDK 11 — 76 tests passed.

HiveCatalog passed DataField.description() to FieldSchema unchanged, so a
column comment longer than 256 characters made the metastore reject the
COLUMNS_V2 insert and fail the whole CREATE TABLE. Normalize the comment
with the helper IcebergHiveMetadataCommitter already uses, moved to
HiveTableUtils so both callers share it.

Normalization is applied only where comments reach COLUMNS_V2. Partition
keys are stored in PARTITION_KEYS.PKEY_COMMENT, which allows longer
values, and are left untouched.

Generated-by: Claude Code
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 0158246 into apache:master Aug 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] HiveCatalog fails to create tables with column comments longer than 256 characters

2 participants