Skip to content

fix: serialize unbounded varchar as string - #730

Merged
JingsongLi merged 3 commits into
apache:mainfrom
JingsongLi:codex/serialize-string-as-string
Aug 19, 2026
Merged

fix: serialize unbounded varchar as string#730
JingsongLi merged 3 commits into
apache:mainfrom
JingsongLi:codex/serialize-string-as-string

Conversation

@JingsongLi

Copy link
Copy Markdown
Contributor

Summary

  • serialize unbounded VarCharType with Java's STRING alias
  • preserve STRING NOT NULL and bounded VARCHAR(n) behavior
  • add regression coverage for all three serialization forms

Root cause

VarCharType uses display-based Serde serialization, but its Display implementation always emitted VARCHAR(length). As a result, the maximum length used to represent STRING was persisted as VARCHAR(2147483647) instead of Java's canonical STRING form.

Validation

  • cargo fmt --all -- --check
  • cargo test -p paimon --lib (2317 passed, 2 ignored)

@JingsongLi
JingsongLi marked this pull request as ready for review August 19, 2026 05:44

@leaves12138 leaves12138 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that unbounded VarChar serialization now matches Java Paimon's canonical STRING / STRING NOT NULL forms while bounded VARCHAR(n) remains unchanged. The parser already accepts both aliases, and the regression coverage covers nullable, non-null, and bounded cases. LGTM.

@JingsongLi
JingsongLi merged commit a6b26f9 into apache:main Aug 19, 2026
13 checks passed
jerry-024 added a commit to jerry-024/paimon-rust that referenced this pull request Aug 21, 2026
* main:
  perf: vectorize raw vector search (apache#734)
  feat(file_index): add predicate evaluation foundation (apache#721)
  feat(go): add postpone fixed-bucket write bindings (apache#722)
  perf(vindex): split build timing logs by phase (apache#723)
  fix(avro): read TIME, BLOB, MULTISET and non-string-key map columns (apache#724)
  fix(datafusion): surface tag create-time and retention in $tags (apache#728)
  [core] Support multivalue global index (apache#731)
  feat: add Java-compatible array predicate pushdown (apache#732)
  fix: serialize unbounded varchar as string (apache#730)
  perf(vindex): decouple vector read threads and remove chunk barrier (apache#720)
  feat(vindex): add DiskANN and IVF-SQ/RQ support (apache#726)

# Conflicts:
#	crates/paimon/src/table/data_file_reader.rs
#	crates/paimon/src/table/vindex_index_build_builder.rs
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.

2 participants