Skip to content

Commit c4fe227

Browse files
authored
[python] Some memory-reduction for append mode (#3404)
1 parent 8af4046 commit c4fe227

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

apis/python/src/tiledbsoma/io/ingest.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,10 +1098,12 @@ def _extract_new_values_for_append(
10981098
with _factory.open(
10991099
df_uri, "r", soma_type=DataFrame, context=context
11001100
) as previous_soma_dataframe:
1101-
previous_table = previous_soma_dataframe.read().concat()
1102-
previous_df = previous_table.to_pandas()
1101+
previous_sjids_table = previous_soma_dataframe.read().concat()
11031102
previous_join_ids = set(
1104-
int(e) for e in get_dataframe_values(previous_df, SOMA_JOINID)
1103+
int(e)
1104+
for e in get_dataframe_values(
1105+
previous_sjids_table.to_pandas(), SOMA_JOINID
1106+
)
11051107
)
11061108
mask = [
11071109
e.as_py() not in previous_join_ids for e in arrow_table[SOMA_JOINID]

0 commit comments

Comments
 (0)