Skip to content

Commit 2076938

Browse files
authored
chore: Increase snowflake-connector-python dependency to 3.7 (#4008)
* increase snowflake-connector-python to 3.7 Signed-off-by: Chester Ong <chester.ong.ch@gmail.com> * force_return_table to True Signed-off-by: Chester Ong <chester.ong.ch@gmail.com> --------- Signed-off-by: Chester Ong <chester.ong.ch@gmail.com>
1 parent 924f944 commit 2076938

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

sdk/python/feast/infra/offline_stores/snowflake.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -470,20 +470,9 @@ def _to_df_internal(self, timeout: Optional[int] = None) -> pd.DataFrame:
470470
return df
471471

472472
def _to_arrow_internal(self, timeout: Optional[int] = None) -> pyarrow.Table:
473-
pa_table = execute_snowflake_statement(
473+
return execute_snowflake_statement(
474474
self.snowflake_conn, self.to_sql()
475-
).fetch_arrow_all(force_return_table=False)
476-
477-
if pa_table:
478-
return pa_table
479-
else:
480-
empty_result = execute_snowflake_statement(
481-
self.snowflake_conn, self.to_sql()
482-
)
483-
484-
return pyarrow.Table.from_pandas(
485-
pd.DataFrame(columns=[md.name for md in empty_result.description])
486-
)
475+
).fetch_arrow_all(force_return_table=True)
487476

488477
def to_sql(self) -> str:
489478
"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
BYTEWAX_REQUIRED = ["bytewax==0.15.1", "docker>=5.0.2", "kubernetes<=20.13.0"]
9797

9898
SNOWFLAKE_REQUIRED = [
99-
"snowflake-connector-python[pandas]>=3,<4",
99+
"snowflake-connector-python[pandas]>=3.7,<4",
100100
]
101101

102102
SPARK_REQUIRED = [

0 commit comments

Comments
 (0)