Skip to content

Support apply logical type recursively to decode Avro message#13669

Merged
xiangfu0 merged 1 commit intoapache:masterfrom
xiangfu0:avro-logical-type-in-map
Jul 25, 2024
Merged

Support apply logical type recursively to decode Avro message#13669
xiangfu0 merged 1 commit intoapache:masterfrom
xiangfu0:avro-logical-type-in-map

Conversation

@xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Jul 21, 2024

Right now Avro decoder doesn't apply logical type decoder recursively inside Array or Map.

This PR implements the recursive logical for complex schema.

#13670

@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2024

Codecov Report

Attention: Patch coverage is 89.18919% with 4 lines in your changes missing coverage. Please review.

Project coverage is 61.99%. Comparing base (59551e4) to head (604a79d).
Report is 793 commits behind head on master.

Files Patch % Lines
.../pinot/plugin/inputformat/avro/AvroSchemaUtil.java 89.18% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13669      +/-   ##
============================================
+ Coverage     61.75%   61.99%   +0.24%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2554     +118     
  Lines        133233   140516    +7283     
  Branches      20636    21857    +1221     
============================================
+ Hits          82274    87110    +4836     
- Misses        44911    46768    +1857     
- Partials       6048     6638     +590     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 35.09% <0.00%> (-26.61%) ⬇️
java-21 61.88% <89.18%> (+0.25%) ⬆️
skip-bytebuffers-false 61.97% <89.18%> (+0.22%) ⬆️
skip-bytebuffers-true 61.81% <89.18%> (+34.09%) ⬆️
temurin 61.99% <89.18%> (+0.24%) ⬆️
unittests 61.98% <89.18%> (+0.24%) ⬆️
unittests1 46.45% <0.00%> (-0.44%) ⬇️
unittests2 27.76% <89.18%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sajjad-moradi sajjad-moradi left a comment

Choose a reason for hiding this comment

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

LGTM. Could you please add test cases for nullable fields? The reason I'm asking for it is that nullables are common in Avro as new fields added to the existing schemas need to be defined as nullable.
Specifically, it would be nice to add the following fields to the schema of your test case:

  1. nullable with primitive
  2. nullable with GenericRecord
  3. nullable with LogicalType

@xiangfu0 xiangfu0 merged commit 66c8dfe into apache:master Jul 25, 2024
@xiangfu0 xiangfu0 deleted the avro-logical-type-in-map branch July 25, 2024 06:35
ege-st pushed a commit to ege-st/pinot that referenced this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AvroSchemaUtils doesn't apply logical type in the nested structure

3 participants