Skip to content

fix(spec): normalize file-format options to lowercase - #663

Merged
JingsongLi merged 1 commit into
apache:mainfrom
jackylee-ch:fix/normalize-file-format
Aug 4, 2026
Merged

fix(spec): normalize file-format options to lowercase#663
JingsongLi merged 1 commit into
apache:mainfrom
jackylee-ch:fix/normalize-file-format

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

Java routes every file-format option through CoreOptions.normalizeFileFormat,
which lowercases the value. Rust returned it verbatim, and DataFileWriter
interpolates it straight into the file name — so 'file.format' = 'PARQUET' wrote
data-<uuid>-0.PARQUET where Java writes .parquet. Reads still worked (the format
dispatch lowercases the path), so the effect was inconsistent file naming rather
than a hard failure.

Fix: trim and lowercase in file_format, changelog_file_format and
vector_file_format, and treat a blank value as unset so it falls back to the
default instead of yielding an empty extension. Two consumers that re-did
.trim().to_ascii_lowercase() themselves now rely on the accessor.

Java routes every file-format option through `CoreOptions.normalizeFileFormat`,
which lowercases the value. Rust returned it verbatim, and `DataFileWriter`
interpolates it straight into the file name, so `'file.format' = 'PARQUET'` wrote
`data-<uuid>-0.PARQUET` where Java writes `.parquet`. Reads still worked because
the format dispatch lowercases the path, so the effect was inconsistent file
naming rather than a hard failure.

Trim and lowercase in `file_format`, `changelog_file_format` and
`vector_file_format`, and treat a blank value as unset so it falls back to the
default instead of yielding an empty extension. Two consumers that re-did
`.trim().to_ascii_lowercase()` themselves now rely on the accessor.
@jackylee-ch
jackylee-ch force-pushed the fix/normalize-file-format branch from 1c641ed to eefcbf3 Compare August 4, 2026 02:12

@JingsongLi JingsongLi 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.

+1

@JingsongLi
JingsongLi merged commit 52ec867 into apache:main Aug 4, 2026
13 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.

2 participants