Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed infer logical type name from avro union schema #13224

Merged
merged 1 commit into from
May 28, 2024

Conversation

rajagopr
Copy link
Contributor

@rajagopr rajagopr commented May 25, 2024

Prior to this change, the logical type conversion won't work correctly if the field level schema is of union type. Example schema below that did not work previously and works with this change.

{
  "type": "record",
  "name": "Event",
  "fields": [
    "null",
    {
      "name": "amount",
      "type": [
        {
          "type": "bytes",
          "logicalType": "decimal",
          "precision": 20,
          "scale": 11
        }
      ]
    }
  ]
}

@codecov-commenter
Copy link

codecov-commenter commented May 25, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 62.18%. Comparing base (59551e4) to head (a98fc84).
Report is 495 commits behind head on master.

Files Patch % Lines
.../pinot/plugin/inputformat/avro/AvroSchemaUtil.java 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13224      +/-   ##
============================================
+ Coverage     61.75%   62.18%   +0.43%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2533      +97     
  Lines        133233   138834    +5601     
  Branches      20636    21503     +867     
============================================
+ Hits          82274    86330    +4056     
- Misses        44911    46057    +1146     
- Partials       6048     6447     +399     
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 62.13% <90.00%> (+0.42%) ⬆️
java-21 62.06% <90.00%> (+0.44%) ⬆️
skip-bytebuffers-false 62.17% <90.00%> (+0.42%) ⬆️
skip-bytebuffers-true 62.04% <90.00%> (+34.31%) ⬆️
temurin 62.18% <90.00%> (+0.43%) ⬆️
unittests 62.17% <90.00%> (+0.43%) ⬆️
unittests1 46.65% <0.00%> (-0.24%) ⬇️
unittests2 27.87% <90.00%> (+0.14%) ⬆️

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.

@Jackie-Jiang Jackie-Jiang merged commit c2b1132 into apache:master May 28, 2024
19 checks passed
@rajagopr rajagopr deleted the avro-logical-type-fix branch May 28, 2024 19:03
gortiz pushed a commit to gortiz/pinot that referenced this pull request Jun 14, 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.

3 participants