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

Relax avro record type bound #4803

Merged
merged 3 commits into from
May 23, 2023
Merged

Relax avro record type bound #4803

merged 3 commits into from
May 23, 2023

Conversation

RustedBones
Copy link
Contributor

Part of #4459

Also fixes a bug for 2nd key in parquet for scala model

Object obj = value;
for (Method getter : getOrInitGetters(keyPath, value.getClass())) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was wrong. We would return the 1st cached getter regardless if the key was the primary or the secondary

Copy link
Contributor

Choose a reason for hiding this comment

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

Yikes!

Comment on lines +49 to +50
@JsonIgnore private final AtomicReference<int[]> keyPath = new AtomicReference<>();
@JsonIgnore private final AtomicReference<int[]> keyPathSecondary = new AtomicReference<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We now have to delay the construction for those, as the schema is required to get access to the field index instead of the field name

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Merging #4803 (97a2c3a) into main (d15477d) will increase coverage by 1.72%.
The diff coverage is 83.02%.

❗ Current head 97a2c3a differs from pull request most recent head 697695e. Consider uploading reports for the commit 697695e to get more accurate results

@@            Coverage Diff             @@
##             main    #4803      +/-   ##
==========================================
+ Coverage   60.67%   62.40%   +1.72%     
==========================================
  Files         286      280       -6     
  Lines       10447    10405      -42     
  Branches      693      768      +75     
==========================================
+ Hits         6339     6493     +154     
+ Misses       4108     3912     -196     
Impacted Files Coverage Δ
...ain/scala/com/spotify/scio/cassandra/package.scala 100.00% <ø> (ø)
...om/spotify/scio/coders/instances/TupleCoders.scala 33.89% <ø> (+1.53%) ⬆️
...otify/scio/coders/LowPriorityCoderDerivation.scala 97.43% <ø> (ø)
...fy/scio/coders/instances/kryo/AvroSerializer.scala 100.00% <ø> (ø)
...spotify/scio/hash/MutableScalableBloomFilter.scala 95.58% <ø> (ø)
...re/src/main/scala/com/spotify/scio/io/ScioIO.scala 55.00% <ø> (ø)
...potify/scio/runners/dataflow/DataflowContext.scala 0.00% <0.00%> (ø)
...om/spotify/scio/elasticsearch/CoderInstances.scala 100.00% <ø> (ø)
...m/spotify/scio/elasticsearch/ElasticsearchIO.scala 34.48% <ø> (ø)
...la/com/spotify/scio/elasticsearch/IndexAdmin.scala 0.00% <ø> (ø)
... and 56 more

... and 10 files with indirect coverage changes

@RustedBones RustedBones requested a review from kellen May 12, 2023 12:30
@RustedBones RustedBones merged commit aa351e0 into main May 23, 2023
@RustedBones RustedBones deleted the relax-avro-record-type branch May 23, 2023 16:21
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.

2 participants