Skip to content

Commit

Permalink
Refactor save_table method in polars_connector.py to use Arrow format…
Browse files Browse the repository at this point in the history
… for writing tables
  • Loading branch information
KeplerC committed Apr 18, 2024
1 parent 1abe058 commit 44cef09
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fog_x/database/polars_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ def load_tables(self, table_names: List[str]):
logger.debug(f"Table {table_name} does not exist in {path}.")

def save_table(self, table_name: str):
self.tables[table_name].write_parquet(
f"{self.path}/{table_name}.parquet"
)
pq.write_table(self.tables[table_name].to_arrow(), f"{self.path}/{table_name}.parquet")


class LazyFrameConnector(PolarsConnector):
Expand Down

0 comments on commit 44cef09

Please sign in to comment.