fix(avro): read TIME, BLOB, MULTISET and non-string-key map columns - #724
Merged
JingsongLi merged 1 commit intoAug 20, 2026
Merged
Conversation
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
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.
Reading a table whose data files are Avro fails or loses data for three column
types that Java Paimon happily writes.
TIME,BLOBandMULTISEThave no arm in the Avro reader'sbuild_column,so a query over such a column aborts with
Avro reader does not support data type: ...even though the same column reads fine from Parquet,.rowandMosaic. Java writes all three:
AvroSchemaConvertermapsTIMEto an int withthe
time-millislogical type (rejecting precision above 3),BLOBto bytesalongside
BINARY/VARBINARY, andMULTISET<T>to a map from the element toan int count.
A map whose key is not a string is worse than a hard failure. Avro supports
string keys natively only, so Java encodes those as an array of
{key, value}records (
AvroSchemaConverter#isArrayMap).build_map_columnonly matchedValue::Mapand the fallback arm pushed an unchanged offset, so every such rowdecoded to a non-null map with zero entries, silently dropping the data.
Fix: add the three missing type arms, and decode the array-map shape into
the same Arrow
Maparray. Entries missing either field are skipped rather thanshifting the offsets of later rows.
MAPandMULTISETdeclare key nullabilitydifferently in
paimon_type_to_arrow, so the shared helper takes both flagsexplicitly and the new tests go through
build_target_arrow_schemato pin it.VECTORis still unsupported here: Java maps it to an Avro array, but itsArrow type is
FixedSizeListrather thanList, so it needs its own builder.Happy to follow up separately.