-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🐛 follow up to #35471: update the cartesian stream slicer #35865
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
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.
Thanks for tackling this so quickly.
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.
Should we also have this check if the list has only one element?
product = itertools.product(*sub_slices) | ||
for stream_slice_tuple in product: | ||
partition = dict(ChainMap(*[s.partition for s in stream_slice_tuple])) | ||
cursor_slice = dict(ChainMap(*[s.cursor_slice for s in stream_slice_tuple])) |
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.
It feels weird that we would have multiple cursor here but I guess it has always been like that. I'm just wondering if we should fail loudly because we don't understand this business case or just let it happen and have an undetermined behavior
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.
agreed. fixed
I'd prefer avoiding a breaking change as part of a bug fix, but happy to revisit |
What
This caused connectors to fail because dicts are returned instead of
StreamSlice
sHow
Testing
I tested this bugfix with Patrick's harvest low-code connector and confirmed we were able to pull the records without failing
Recommended reading order
airbyte-cdk/python/airbyte_cdk/sources/declarative/stream_slicers/cartesian_product_stream_slicer.py
airbyte-cdk/python/unit_tests/sources/declarative/stream_slicers/test_cartesian_product_stream_slicer.py