You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# We are starting to migrate streams to instantiate directly the DefaultStream instead of instantiating the
2074
2063
# DeclarativeStream and assembling the DefaultStream from that. The plan is the following:
2075
2064
# * Streams without partition router nor cursors and streams with only partition router. This is the `isinstance(combined_slicers, PartitionRouter)` condition as the first kind with have a SinglePartitionRouter
2076
-
# * Streams without partition router but with cursor
2065
+
# * Streams without partition router but with cursor. This is the `isinstance(concurrent_cursor, ConcurrentCursor)` condition
2077
2066
# * Streams with both partition router and cursor
2078
2067
# We specifically exclude parent streams here because SubstreamPartitionRouter has not been updated yet
2079
2068
# We specifically exclude Connector Builder stuff for now as Brian is working on this anyway
2069
+
2070
+
stream_slicer=concurrent_cursor
2071
+
ifisinstance(retriever, AsyncRetriever):
2072
+
# The AsyncRetriever only ever worked with a cursor from the concurrent package. Hence, the method
2073
+
# `_build_incremental_cursor` which we would usually think would return only declarative stuff has a
2074
+
# special clause and return a concurrent cursor. This stream slicer is passed to AsyncRetriever when
2075
+
# built because the async retriever has a specific partition router which relies on this stream slicer.
2076
+
# We can't re-use `concurrent_cursor` because it is a different instance than the one passed in
cursor_field=cursor.cursor_field.cursor_field_keyifhasattr(cursor, "cursor_field") else"", # FIXME we should have the cursor field has part of the interface of cursor,
2096
2099
# FIXME we should have the cursor field has part of the interface of cursor
0 commit comments