Skip to content

Commit d209fca

Browse files
committed
remove unused state stuff
1 parent ee3ed91 commit d209fca

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

airbyte_cdk/sources/declarative/concurrent_declarative_source.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -468,24 +468,11 @@ def _is_concurrent_cursor_incremental_without_partition_routing(
468468
def _get_retriever(
469469
declarative_stream: DeclarativeStream, stream_state: Mapping[str, Any]
470470
) -> Retriever:
471-
retriever = declarative_stream.retriever
472-
473-
# This is an optimization so that we don't invoke any cursor or state management flows within the
474-
# low-code framework because state management is handled through the ConcurrentCursor.
475-
if declarative_stream and isinstance(retriever, SimpleRetriever):
476-
# Also a temporary hack. In the legacy Stream implementation, as part of the read,
477-
# set_initial_state() is called to instantiate incoming state on the cursor. Although we no
478-
# longer rely on the legacy low-code cursor for concurrent checkpointing, low-code components
479-
# like StopConditionPaginationStrategyDecorator still rely on a DatetimeBasedCursor that is
480-
# properly initialized with state.
481-
if retriever.cursor:
482-
retriever.cursor.set_initial_state(stream_state=stream_state)
483-
471+
if declarative_stream and isinstance(declarative_stream.retriever, SimpleRetriever):
484472
# We zero it out here, but since this is a cursor reference, the state is still properly
485473
# instantiated for the other components that reference it
486-
retriever.cursor = None
487-
488-
return retriever
474+
declarative_stream.retriever.cursor = None
475+
return declarative_stream.retriever
489476

490477
@staticmethod
491478
def _select_streams(

0 commit comments

Comments
 (0)