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

Patch datum factory for specific data in IOs #4975

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

RustedBones
Copy link
Contributor

Quick patch for apache/beam#28279

Unfortunately, contains some code duplication:

  • avro coder still in scio-core
  • SMB avro not in scio package + not streamlined with beam AvroIO

DatumReader<ValueT> datumReader =
recordClass == null
? new GenericDatumReader<>(schema)
: new ReflectDatumReader<>(recordClass);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

SMB avro read was not symmetric with writer and did not have any logical type conversion applied.

Copy link
Contributor

Choose a reason for hiding this comment

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

We were lucky nobody used logical types in SMB?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it yes

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #4975 (009066f) into main (dd3e9f3) will increase coverage by 0.02%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

❗ Current head 009066f differs from pull request most recent head 5cc77ba. Consider uploading reports for the commit 5cc77ba to get more accurate results

@@            Coverage Diff             @@
##             main    #4975      +/-   ##
==========================================
+ Coverage   63.09%   63.12%   +0.02%     
==========================================
  Files         282      283       +1     
  Lines       10649    10659      +10     
  Branches      767      765       -2     
==========================================
+ Hits         6719     6728       +9     
- Misses       3930     3931       +1     
Files Changed Coverage Δ
...scala/com/spotify/scio/avro/AvroDatumFactory.scala 100.00% <100.00%> (ø)
.../src/main/scala/com/spotify/scio/avro/AvroIO.scala 93.63% <100.00%> (ø)
...com/spotify/scio/coders/instances/AvroCoders.scala 86.36% <100.00%> (+0.64%) ⬆️
.../com/spotify/scio/parquet/avro/ParquetAvroIO.scala 89.25% <100.00%> (-0.18%) ⬇️
...y/scio/parquet/read/ParquetReadConfiguration.scala 100.00% <100.00%> (ø)
...ify/scio/parquet/tensorflow/ParquetExampleIO.scala 88.76% <100.00%> (-0.25%) ⬇️
...com/spotify/scio/parquet/types/ParquetTypeIO.scala 98.73% <100.00%> (-0.04%) ⬇️

... and 1 file with indirect coverage changes

@RustedBones RustedBones marked this pull request as ready for review September 1, 2023 12:50
@RustedBones RustedBones merged commit ac9bc3a into main Sep 1, 2023
10 checks passed
@RustedBones RustedBones deleted the patch-avro-datum-factory branch September 1, 2023 13:03
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