@@ -2728,7 +2728,7 @@ def create_state_delegating_stream(
2728
2728
self ,
2729
2729
model : StateDelegatingStreamModel ,
2730
2730
config : Config ,
2731
- child_state : Optional [MutableMapping [ str , Any ] ] = None ,
2731
+ has_parent_state : Optional [bool ] = None ,
2732
2732
** kwargs : Any ,
2733
2733
) -> DeclarativeStream :
2734
2734
if (
@@ -2741,7 +2741,7 @@ def create_state_delegating_stream(
2741
2741
2742
2742
stream_model = (
2743
2743
model .incremental_stream
2744
- if self ._connector_state_manager .get_stream_state (model .name , None ) or child_state
2744
+ if self ._connector_state_manager .get_stream_state (model .name , None ) or has_parent_state
2745
2745
else model .full_refresh_stream
2746
2746
)
2747
2747
@@ -3000,13 +3000,15 @@ def _create_message_repository_substream_wrapper(
3000
3000
self ._evaluate_log_level (self ._emit_connector_builder_messages ),
3001
3001
),
3002
3002
)
3003
- child_state = (
3003
+
3004
+ # This flag will be used exclusively for StateDelegatingStream when a parent stream is created
3005
+ has_parent_state = bool (
3004
3006
self ._connector_state_manager .get_stream_state (kwargs .get ("stream_name" , "" ), None )
3005
- if model .incremental_dependency or False
3006
- else None
3007
+ if model .incremental_dependency
3008
+ else False
3007
3009
)
3008
3010
return substream_factory ._create_component_from_model (
3009
- model = model , config = config , child_state = child_state , ** kwargs
3011
+ model = model , config = config , has_parent_state = has_parent_state , ** kwargs
3010
3012
)
3011
3013
3012
3014
@staticmethod
0 commit comments