-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Bulk load CDK: DestinationRecord has full DestinationStream #55811
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
...ke/src/main/kotlin/io/airbyte/integrations/destination/s3_data_lake/S3DataLakePartitioner.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit but LGTM otherwise
?: run { | ||
return abs(random.nextInt()) % numParts | ||
} | ||
return abs(primaryKeyValues.hashCode()) % numParts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use Math.floorMod for this and skip the MIN_VALUE check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h/t @frifriSF59 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 6fc5b0c
pulling this diff out of #55807.
S3DataLakePartitioner has a nontrivial diff; everything else is purely mechanical.
There might be other places where we can do stuff like the partitioner (i.e. instead of storing a map descriptor -> info, get stuff off the stream directly). But I didn't look for them.
(I think we should just leave s3 data lake on local CDK for now :/ since we're about to push some more changes into there anyway)