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

Force scio coders on all input SCollection #4713

Merged
merged 1 commit into from
Feb 16, 2023
Merged

Conversation

RustedBones
Copy link
Contributor

Some scio IOs were not seting scio coders on the underlying PCollection and relying on the default coder provided by beam. This can cause issues:

  • coder options are not respected (Nullable)
  • union may fail. Default beam coders are not 'wrapped'. The beam runtime check on coder equality fails.

}

@deprecated("Use avroSpecificRecordCoder instead", since = "0.12.5")
def genAvro[T <: SpecificRecordBase]: Coder[T] =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Drop this as done in #4590. This coder can't be called on a generic type with bounds.

@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Merging #4713 (bd0fd49) into main (1c30980) will decrease coverage by 0.02%.
The diff coverage is 30.95%.

❗ Current head bd0fd49 differs from pull request most recent head 841f023. Consider uploading reports for the commit 841f023 to get more accurate results

@@            Coverage Diff             @@
##             main    #4713      +/-   ##
==========================================
- Coverage   60.94%   60.93%   -0.02%     
==========================================
  Files         286      286              
  Lines       10467    10479      +12     
  Branches      750      755       +5     
==========================================
+ Hits         6379     6385       +6     
- Misses       4088     4094       +6     
Impacted Files Coverage Δ
...n/scala/com/spotify/scio/bigquery/BigQueryIO.scala 39.13% <0.00%> (-0.50%) ⬇️
...n/scala/com/spotify/scio/bigtable/BigTableIO.scala 20.00% <0.00%> (-0.52%) ⬇️
...scala/com/spotify/scio/datastore/DatastoreIO.scala 16.66% <0.00%> (+4.16%) ⬆️
.../main/scala/com/spotify/scio/pubsub/PubsubIO.scala 9.87% <0.00%> (-0.52%) ⬇️
...ain/scala/com/spotify/scio/spanner/SpannerIO.scala 23.07% <0.00%> (-0.93%) ⬇️
.../src/main/scala/com/spotify/scio/jdbc/JdbcIO.scala 27.50% <0.00%> (ø)
.../spotify/scio/jdbc/sharded/JdbcShardedSelect.scala 16.66% <0.00%> (ø)
.../src/main/scala/com/spotify/scio/avro/AvroIO.scala 93.00% <100.00%> (+0.14%) ⬆️
...com/spotify/scio/coders/instances/AvroCoders.scala 82.35% <100.00%> (+2.35%) ⬆️
...re/src/main/scala/com/spotify/scio/io/TextIO.scala 100.00% <100.00%> (ø)
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@RustedBones RustedBones merged commit 53864aa into main Feb 16, 2023
@RustedBones RustedBones deleted the io-read-scio-coder branch February 16, 2023 15:17
farzad-sedghi pushed a commit to farzad-sedghi/scio that referenced this pull request Mar 6, 2023
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.

None yet

2 participants