Skip to content

[cpp] Encode CreateTable column types losslessly#3603

Merged
fresh-borzoni merged 1 commit into
apache:mainfrom
fresh-borzoni:cpp-lossless-createtable-types
Jul 9, 2026
Merged

[cpp] Encode CreateTable column types losslessly#3603
fresh-borzoni merged 1 commit into
apache:mainfrom
fresh-borzoni:cpp-lossless-createtable-types

Conversation

@fresh-borzoni

Copy link
Copy Markdown
Member

Migrated from flus-rust repo
closes apache/fluss-rust#637

Creating a table with a nested MAP/ROW column went through an Arrow schema, which affected timestamp/time precision, dropped column comments, and turned CHAR(n) into STRING. So it's better to fix it and use native converter and not Arrow schema's one.

Now the column types go to the server natively and are stored exactly as declared.

@fresh-borzoni

fresh-borzoni commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

@charlesdong1991 Thank you for the review in fluss-rust, let's continue here then
Addressing comments, PTAL

does it hold true for Time? i think precision will change still for time?

Good catch — it was actually lossy, not just docs. Fixed: Time now carries precision end-to-end, so TIME(p) round-trips like TIMESTAMP(p). Added a test covering it.

so we will drop description? i guess it is intended?

Yes, it's better to leave it as follow-up(a lot of plumbing), also python also doesn't propagate for nested fields in ROW. Created an issue: #3604

Nit: since the targets are precision, comment and char, can we add an integration test that create a table with those type, and then assert get-table-info returns exactly those values?

Added a test, good call 👍

@charlesdong1991 charlesdong1991 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!! 👍

@fresh-borzoni fresh-borzoni merged commit c4d6c49 into apache:main Jul 9, 2026
9 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.

[cpp] Encode CreateTable column types losslessly

2 participants