Skip to content

Commit

Permalink
perf(clickhouse): avoid unnecessary construction of a pyarrow table w…
Browse files Browse the repository at this point in the history
…hen inserting a pandas dataframe (#10287)
  • Loading branch information
cpcloud authored Oct 9, 2024
1 parent 800677f commit 7fd710c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ibis/backends/clickhouse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,7 @@ def insert(
if isinstance(obj, pa.Table):
return self.con.insert_arrow(name, obj, settings=settings, **kwargs)
elif isinstance(obj, pd.DataFrame):
return self.con.insert_arrow(
name, pa.Table.from_pandas(obj), settings=settings, **kwargs
)
return self.con.insert_df(name, obj, settings=settings, **kwargs)
elif not isinstance(obj, ir.Table):
obj = ibis.memtable(obj)

Expand Down

0 comments on commit 7fd710c

Please sign in to comment.