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

[fast-avro] FastGenericDatumReader forwards setSchema() to coldDeserializer #534

Merged

Conversation

krisso-rtb
Copy link
Contributor

Fixes the issue described in a comment:


Consider below code-snippet:

FastSpecificDatumReader<SomeRecord> datumReader = new FastSpecificDatumReader<>(null, schema);
DataFileStream<SomeRecord> dataFileStream = new DataFileStream<>(inputStream, datumReader);

Writer schema passed to FastSpecificDatumReader's c-tor is null because it's unknown yet.
C-tor of DataFileStream extracts the writerSchema from inputStream and passes it to the datumReader by invoking reader.setSchema(header.schema);

This PR forwards setSchema() call to coldDeserializer which is used until the actual (fast) deserializer is generated.

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b0e0a27) 46.12% compared to head (790b304) 46.12%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #534   +/-   ##
=========================================
  Coverage     46.12%   46.12%           
+ Complexity     4540     4539    -1     
=========================================
  Files           407      407           
  Lines         28423    28423           
  Branches       4637     4637           
=========================================
  Hits          13110    13110           
  Misses        13746    13746           
  Partials       1567     1567           

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

@krisso-rtb krisso-rtb force-pushed the delegate-setSchema-to-coldDeserializer branch 2 times, most recently from cfb73d8 to 3261c32 Compare January 18, 2024 09:25
@krisso-rtb krisso-rtb force-pushed the delegate-setSchema-to-coldDeserializer branch from 3261c32 to 790b304 Compare January 24, 2024 11:35
@dg-builder dg-builder merged commit 9487a8b into linkedin:master Jan 24, 2024
2 checks passed
@krisso-rtb krisso-rtb deleted the delegate-setSchema-to-coldDeserializer branch January 24, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants