[cli] Split convert into JSON and CSV commands#69
Open
jianguotian wants to merge 5 commits into
Open
Conversation
added 2 commits
July 2, 2026 05:49
- restore --stats on convert and convert-csv so converted files keep min/max stats for cat --where row-group skipping - error with the column name when sampled JSON inference cannot type an all-null field, instead of the writer's late unsupported-DataType error - accept .jsonl JSON-lines input again and name the accepted suffixes in the rejection message - with an explicit schema, fail when no schema field matches the CSV header or a required field is missing from it, instead of writing silent all-null columns - reject --require together with --schema instead of silently ignoring it, and report not-null violations with the schema field name rather than a positional reader name - skip empty CSV shards instead of failing on them (or writing a 0-column file); error only when every input is empty - validate Avro decimal scale (0..=precision) at schema parse time - skip the per-file width scan when the CSV schema was inferred (arrow inference already rejects ragged rows) - cover multi-input, --no-header, ragged rows, empty shards, and the new failure modes in e2e tests - describe the commands on their own terms in README, help text, and comments, and bring docs/cli.html in sync with the convert/convert-csv split
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
CSV is not self-describing, so a column whose values are all empty can be inferred as Arrow
Nulland fail later when creating a Mosaic file. This PR separates JSON and CSV conversion paths, adds explicit schema support when inference is not enough, and reports invalid conversion inputs earlier with clearer errors.Changes
convertfor JSON conversion and addconvert-csvfor CSV conversion.Tests
cargo test -p paimon-mosaic-cli.