feat(tools): support Parquet and Arrow import with schema/auto modes#793
Open
gengziyand wants to merge 4 commits intoapache:developfrom
Open
feat(tools): support Parquet and Arrow import with schema/auto modes#793gengziyand wants to merge 4 commits intoapache:developfrom
gengziyand wants to merge 4 commits intoapache:developfrom
Conversation
CritasWang
suggested changes
Apr 24, 2026
| private List<String> getSchemaColumnNames() { | ||
| List<String> names = new ArrayList<>(); | ||
| for (ImportSchema.SourceColumn col : schema.getSourceColumns()) { | ||
| if (!col.isSkip()) { |
Contributor
There was a problem hiding this comment.
In schema mode these readers drop skipped source columns from the SourceBatch, but TabletBuilder still indexes values by the original source_columns positions. With a schema like time, unused SKIP, value, getSchemaColumnNames() returns only [time, value], while TabletBuilder maps value to index 2, so batch.getValue(row, 2) throws and the import fails (or later columns shift incorrectly). This affects real Parquet/Arrow schemas using SKIP, and the current Parquet test only checks readBatch(), not the ImportExecutor path. Keep placeholder columns for skipped entries or change the builder mapping to use batch column names rather than schema positions.
added 2 commits
April 24, 2026 17:02
…fs-client transitive dependencies
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.
Summary
id_columns→tag_columns,csv_columns→source_columns(backward compatible)parquet2tsfile.sh/.batandarrow2tsfile.sh/.batscripts--format,--table_name,--time_precision,--separatorChanges
ParquetSourceReader,ArrowSourceReader,AutoSchemaInferer,ImportExecutor,ImportSchema,ImportSchemaParser,SourceReader,SourceBatch,TabletBuilder,TimeConverter,ValueConverterTsFileTool.java(unified CLI entry point),CsvSourceReader.java(auto mode support)parquet-hadoop 1.14.4,hadoop-common 3.3.6,arrow-vector 15.0.2Test plan