Skip to content

Commit 0fa78a6

Browse files
committed
chore: rename param
Signed-off-by: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com>
1 parent fc1d503 commit 0fa78a6

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

python/deltalake/_internal.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class RawDeltaTable:
197197
commit_properties: Optional[CommitProperties],
198198
post_commithook_properties: Optional[PostCommitHookProperties],
199199
safe_cast: bool,
200-
streaming: bool,
200+
streamed_exec: bool,
201201
) -> PyMergeBuilder: ...
202202
def merge_execute(self, merge_builder: PyMergeBuilder) -> str: ...
203203
def get_active_partitions(

python/deltalake/table.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ def merge(
980980
error_on_type_mismatch: bool = True,
981981
writer_properties: Optional[WriterProperties] = None,
982982
large_dtypes: Optional[bool] = None,
983-
streaming: bool = False,
983+
streamed_exec: bool = False,
984984
custom_metadata: Optional[Dict[str, str]] = None,
985985
post_commithook_properties: Optional[PostCommitHookProperties] = None,
986986
commit_properties: Optional[CommitProperties] = None,
@@ -998,7 +998,7 @@ def merge(
998998
error_on_type_mismatch: specify if merge will return error if data types are mismatching :default = True
999999
writer_properties: Pass writer properties to the Rust parquet writer
10001000
large_dtypes: Deprecated, will be removed in 1.0
1001-
streaming: Will execute MERGE using a LazyMemoryExec plan
1001+
streamed_exec: Will execute MERGE using a LazyMemoryExec plan
10021002
arrow_schema_conversion_mode: Large converts all types of data schema into Large Arrow types, passthrough keeps string/binary/list types untouched
10031003
custom_metadata: Deprecated and will be removed in future versions. Use commit_properties instead.
10041004
post_commithook_properties: properties for the post commit hook. If None, default values are used.
@@ -1065,7 +1065,7 @@ def merge(
10651065
target_alias=target_alias,
10661066
merge_schema=merge_schema,
10671067
safe_cast=not error_on_type_mismatch,
1068-
streaming=streaming,
1068+
streamed_exec=streamed_exec,
10691069
writer_properties=writer_properties,
10701070
commit_properties=commit_properties,
10711071
post_commithook_properties=post_commithook_properties,

python/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ impl RawDeltaTable {
936936
target_alias = None,
937937
merge_schema = false,
938938
safe_cast = false,
939-
streaming = false,
939+
streamed_exec = false,
940940
writer_properties = None,
941941
post_commithook_properties = None,
942942
commit_properties = None,
@@ -950,7 +950,7 @@ impl RawDeltaTable {
950950
target_alias: Option<String>,
951951
merge_schema: bool,
952952
safe_cast: bool,
953-
streaming: bool,
953+
streamed_exec: bool,
954954
writer_properties: Option<PyWriterProperties>,
955955
post_commithook_properties: Option<PyPostCommitHookProperties>,
956956
commit_properties: Option<PyCommitProperties>,
@@ -972,7 +972,7 @@ impl RawDeltaTable {
972972
target_alias,
973973
merge_schema,
974974
safe_cast,
975-
streaming,
975+
streamed_exec,
976976
writer_properties,
977977
post_commithook_properties,
978978
commit_properties,

python/src/merge.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl PyMergeBuilder {
8989
target_alias: Option<String>,
9090
merge_schema: bool,
9191
safe_cast: bool,
92-
streaming: bool,
92+
streamed_exec: bool,
9393
writer_properties: Option<PyWriterProperties>,
9494
post_commithook_properties: Option<PyPostCommitHookProperties>,
9595
commit_properties: Option<PyCommitProperties>,
@@ -98,7 +98,7 @@ impl PyMergeBuilder {
9898
let ctx = SessionContext::new();
9999
let schema = source.schema();
100100

101-
let source_df = if streaming {
101+
let source_df = if streamed_exec {
102102
let arrow_stream: Arc<Mutex<ArrowArrayStreamReader>> = Arc::new(Mutex::new(source));
103103
let arrow_stream_batch_generator: Arc<RwLock<dyn LazyBatchGenerator>> =
104104
Arc::new(RwLock::new(ArrowStreamBatchGenerator::new(arrow_stream)));
@@ -117,7 +117,7 @@ impl PyMergeBuilder {
117117

118118
let mut cmd = MergeBuilder::new(log_store, snapshot, predicate, source_df)
119119
.with_safe_cast(safe_cast)
120-
.with_streaming(streaming);
120+
.with_streaming(streamed_exec);
121121

122122
if let Some(src_alias) = &source_alias {
123123
cmd = cmd.with_source_alias(src_alias);

python/tests/test_merge.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_merge_when_matched_delete_wo_predicate(
3434
source_alias="s",
3535
target_alias="t",
3636
commit_properties=commit_properties,
37-
streaming=streaming,
37+
streamed_exec=streaming,
3838
).when_matched_delete().execute()
3939

4040
nrows = 4
@@ -77,7 +77,7 @@ def test_merge_when_matched_delete_with_predicate(
7777
predicate="t.id = s.id",
7878
source_alias="s",
7979
target_alias="t",
80-
streaming=streaming,
80+
streamed_exec=streaming,
8181
).when_matched_delete("s.deleted = True").execute()
8282

8383
nrows = 4
@@ -117,7 +117,7 @@ def test_merge_when_matched_update_wo_predicate(
117117
predicate="t.id = s.id",
118118
source_alias="s",
119119
target_alias="t",
120-
streaming=streaming,
120+
streamed_exec=streaming,
121121
).when_matched_update({"price": "s.price", "sold": "s.sold"}).execute()
122122

123123
expected = pa.table(
@@ -201,7 +201,7 @@ def test_merge_when_matched_update_all_wo_predicate(
201201
predicate="t.id = s.id",
202202
source_alias="s",
203203
target_alias="t",
204-
streaming=streaming,
204+
streamed_exec=streaming,
205205
).when_matched_update_all().execute()
206206

207207
expected = pa.table(
@@ -242,7 +242,7 @@ def test_merge_when_matched_update_all_with_exclude(
242242
predicate="t.id = s.id",
243243
source_alias="s",
244244
target_alias="t",
245-
streaming=streaming,
245+
streamed_exec=streaming,
246246
).when_matched_update_all(except_cols=["sold"]).execute()
247247

248248
expected = pa.table(
@@ -282,7 +282,7 @@ def test_merge_when_matched_update_with_predicate(
282282
source_alias="source",
283283
target_alias="target",
284284
predicate="target.id = source.id",
285-
streaming=streaming,
285+
streamed_exec=streaming,
286286
).when_matched_update(
287287
updates={"price": "source.price", "sold": "source.sold"},
288288
predicate="source.deleted = False",
@@ -325,7 +325,7 @@ def test_merge_when_not_matched_insert_wo_predicate(
325325
source_alias="source",
326326
target_alias="target",
327327
predicate="target.id = source.id",
328-
streaming=streaming,
328+
streamed_exec=streaming,
329329
).when_not_matched_insert(
330330
updates={
331331
"id": "source.id",
@@ -372,7 +372,7 @@ def test_merge_when_not_matched_insert_with_predicate(
372372
source_alias="source",
373373
target_alias="target",
374374
predicate="target.id = source.id",
375-
streaming=streaming,
375+
streamed_exec=streaming,
376376
).when_not_matched_insert(
377377
updates={
378378
"id": "source.id",
@@ -471,7 +471,7 @@ def test_merge_when_not_matched_insert_all_with_predicate(
471471
source_alias="source",
472472
target_alias="target",
473473
predicate="target.id = source.id",
474-
streaming=streaming,
474+
streamed_exec=streaming,
475475
).when_not_matched_insert_all(
476476
predicate="source.price < 50",
477477
).execute()
@@ -513,7 +513,7 @@ def test_merge_when_not_matched_insert_all_with_exclude(
513513
source_alias="source",
514514
target_alias="target",
515515
predicate="target.id = source.id",
516-
streaming=streaming,
516+
streamed_exec=streaming,
517517
).when_not_matched_insert_all(except_cols=["sold"]).execute()
518518

519519
expected = pa.table(
@@ -595,7 +595,7 @@ def test_merge_when_not_matched_insert_all_with_predicate_special_column_names(
595595
source_alias="source",
596596
target_alias="target",
597597
predicate="target.`1id` = source.`1id`",
598-
streaming=streaming,
598+
streamed_exec=streaming,
599599
).when_not_matched_insert_all(
600600
predicate="source.price < 50",
601601
).execute()
@@ -637,7 +637,7 @@ def test_merge_when_not_matched_by_source_update_wo_predicate(
637637
source_alias="source",
638638
target_alias="target",
639639
predicate="target.id = source.id",
640-
streaming=streaming,
640+
streamed_exec=streaming,
641641
).when_not_matched_by_source_update(
642642
updates={
643643
"sold": "int'10'",
@@ -681,7 +681,7 @@ def test_merge_when_not_matched_by_source_update_with_predicate(
681681
source_alias="source",
682682
target_alias="target",
683683
predicate="target.id = source.id",
684-
streaming=streaming,
684+
streamed_exec=streaming,
685685
).when_not_matched_by_source_update(
686686
updates={
687687
"sold": "int'10'",
@@ -725,7 +725,7 @@ def test_merge_when_not_matched_by_source_delete_with_predicate(
725725
source_alias="source",
726726
target_alias="target",
727727
predicate="target.id = source.id",
728-
streaming=streaming,
728+
streamed_exec=streaming,
729729
).when_not_matched_by_source_delete(predicate="target.price > 3").execute()
730730

731731
expected = pa.table(
@@ -763,7 +763,7 @@ def test_merge_when_not_matched_by_source_delete_wo_predicate(
763763
source_alias="source",
764764
target_alias="target",
765765
predicate="target.id = source.id",
766-
streaming=streaming,
766+
streamed_exec=streaming,
767767
).when_not_matched_by_source_delete().execute()
768768

769769
expected = pa.table(
@@ -806,7 +806,7 @@ def test_merge_multiple_when_matched_update_with_predicate(
806806
source_alias="source",
807807
target_alias="target",
808808
predicate="target.id = source.id",
809-
streaming=streaming,
809+
streamed_exec=streaming,
810810
).when_matched_update(
811811
updates={"price": "source.price", "sold": "source.sold"},
812812
predicate="source.deleted = False",
@@ -852,7 +852,7 @@ def test_merge_multiple_when_matched_update_all_with_predicate(
852852
source_alias="source",
853853
target_alias="target",
854854
predicate="target.id = source.id",
855-
streaming=streaming,
855+
streamed_exec=streaming,
856856
).when_matched_update_all(
857857
predicate="source.deleted = False",
858858
).when_matched_update_all(
@@ -896,7 +896,7 @@ def test_merge_multiple_when_not_matched_insert_with_predicate(
896896
source_alias="source",
897897
target_alias="target",
898898
predicate="target.id = source.id",
899-
streaming=streaming,
899+
streamed_exec=streaming,
900900
).when_not_matched_insert(
901901
updates={
902902
"id": "source.id",
@@ -953,7 +953,7 @@ def test_merge_multiple_when_matched_delete_with_predicate(
953953
predicate="t.id = s.id",
954954
source_alias="s",
955955
target_alias="t",
956-
streaming=streaming,
956+
streamed_exec=streaming,
957957
).when_matched_delete("s.deleted = True").when_matched_delete(
958958
"s.deleted = false"
959959
).execute()
@@ -999,7 +999,7 @@ def test_merge_multiple_when_not_matched_by_source_update_wo_predicate(
999999
source_alias="source",
10001000
target_alias="target",
10011001
predicate="target.id = source.id",
1002-
streaming=streaming,
1002+
streamed_exec=streaming,
10031003
).when_not_matched_by_source_update(
10041004
updates={
10051005
"sold": "int'10'",
@@ -1055,7 +1055,7 @@ def test_merge_date_partitioned_2344(tmp_path: pathlib.Path, streaming: bool):
10551055
predicate="s.date = t.date",
10561056
source_alias="s",
10571057
target_alias="t",
1058-
streaming=streaming,
1058+
streamed_exec=streaming,
10591059
).when_matched_update_all().when_not_matched_insert_all().execute()
10601060

10611061
result = dt.to_pyarrow_table()
@@ -1172,7 +1172,7 @@ def test_merge_stats_columns_stats_provided(
11721172
predicate="source.foo = target.foo",
11731173
source_alias="source",
11741174
target_alias="target",
1175-
streaming=streaming,
1175+
streamed_exec=streaming,
11761176
).when_matched_update_all().execute()
11771177

11781178
dt = DeltaTable(tmp_path)
@@ -1289,7 +1289,7 @@ def test_merge_isin_partition_pruning(tmp_path: pathlib.Path, streaming: bool):
12891289
predicate="t.id = s.id and t.partition in (3,4)",
12901290
source_alias="s",
12911291
target_alias="t",
1292-
streaming=streaming,
1292+
streamed_exec=streaming,
12931293
)
12941294
.when_matched_update_all()
12951295
.execute()
@@ -1340,7 +1340,7 @@ def test_cdc_merge_planning_union_2908(tmp_path, streaming: bool):
13401340
predicate="s.id = t.id",
13411341
source_alias="s",
13421342
target_alias="t",
1343-
streaming=streaming,
1343+
streamed_exec=streaming,
13441344
).when_not_matched_insert_all().execute()
13451345

13461346
last_action = dt.history(1)[0]

0 commit comments

Comments
 (0)