@@ -2645,7 +2645,7 @@ def test_concat_stateful_mismatching_partitions_fails(
2645
2645
sdf1 .concat (sdf2 ).update (lambda v , state : None , stateful = True )
2646
2646
2647
2647
2648
- class TestStreamingDataFrameJoin :
2648
+ class TestStreamingDataFrameJoinLatest :
2649
2649
@pytest .fixture
2650
2650
def topic_manager (self , topic_manager_factory ):
2651
2651
return topic_manager_factory ()
@@ -2748,7 +2748,7 @@ def test_how(
2748
2748
):
2749
2749
left_topic , right_topic = create_topic (), create_topic ()
2750
2750
left_sdf , right_sdf = create_sdf (left_topic ), create_sdf (right_topic )
2751
- joined_sdf = left_sdf .join (right_sdf , how = how )
2751
+ joined_sdf = left_sdf .join_latest (right_sdf , how = how )
2752
2752
assign_partition (right_sdf )
2753
2753
2754
2754
publish (joined_sdf , right_topic , value = right , key = b"key" , timestamp = 1 )
@@ -2766,14 +2766,14 @@ def test_how_invalid_value(self, create_topic, create_sdf):
2766
2766
f"Valid values are: { ', ' .join (get_args (JoinHow ))} ."
2767
2767
)
2768
2768
with pytest .raises (ValueError , match = match ):
2769
- left_sdf .join (right_sdf , how = "invalid" )
2769
+ left_sdf .join_latest (right_sdf , how = "invalid" )
2770
2770
2771
2771
def test_mismatching_partitions_fails (self , create_topic , create_sdf ):
2772
2772
left_topic , right_topic = create_topic (), create_topic (num_partitions = 2 )
2773
2773
left_sdf , right_sdf = create_sdf (left_topic ), create_sdf (right_topic )
2774
2774
2775
2775
with pytest .raises (TopicPartitionsMismatch ):
2776
- left_sdf .join (right_sdf )
2776
+ left_sdf .join_latest (right_sdf )
2777
2777
2778
2778
@pytest .mark .parametrize (
2779
2779
"on_overlap, right, left, expected" ,
@@ -2835,7 +2835,7 @@ def test_on_overlap(
2835
2835
):
2836
2836
left_topic , right_topic = create_topic (), create_topic ()
2837
2837
left_sdf , right_sdf = create_sdf (left_topic ), create_sdf (right_topic )
2838
- joined_sdf = left_sdf .join (right_sdf , how = "left" , on_overlap = on_overlap )
2838
+ joined_sdf = left_sdf .join_latest (right_sdf , how = "left" , on_overlap = on_overlap )
2839
2839
assign_partition (right_sdf )
2840
2840
2841
2841
publish (joined_sdf , right_topic , value = right , key = b"key" , timestamp = 1 )
@@ -2858,7 +2858,7 @@ def test_on_overlap_invalid_value(self, create_topic, create_sdf):
2858
2858
f"Valid values are: { ', ' .join (get_args (JoinOnOverlap ))} ."
2859
2859
)
2860
2860
with pytest .raises (ValueError , match = match ):
2861
- left_sdf .join (right_sdf , on_overlap = "invalid" )
2861
+ left_sdf .join_latest (right_sdf , on_overlap = "invalid" )
2862
2862
2863
2863
def test_custom_merger (self , create_topic , create_sdf , assign_partition , publish ):
2864
2864
left_topic , right_topic = create_topic (), create_topic ()
@@ -2867,7 +2867,7 @@ def test_custom_merger(self, create_topic, create_sdf, assign_partition, publish
2867
2867
def merger (left , right ):
2868
2868
return {"left" : left , "right" : right }
2869
2869
2870
- joined_sdf = left_sdf .join (right_sdf , merger = merger )
2870
+ joined_sdf = left_sdf .join_latest (right_sdf , merger = merger )
2871
2871
assign_partition (right_sdf )
2872
2872
2873
2873
publish (joined_sdf , right_topic , value = 1 , key = b"key" , timestamp = 1 )
@@ -2884,7 +2884,7 @@ def test_retention_ms(
2884
2884
left_topic , right_topic = create_topic (), create_topic ()
2885
2885
left_sdf , right_sdf = create_sdf (left_topic ), create_sdf (right_topic )
2886
2886
2887
- joined_sdf = left_sdf .join (right_sdf , retention_ms = 10 )
2887
+ joined_sdf = left_sdf .join_latest (right_sdf , retention_ms = 10 )
2888
2888
assign_partition (right_sdf )
2889
2889
2890
2890
# min eligible timestamp is 15 - 10 = 5
0 commit comments