Skip to content

Commit

Permalink
chore: Increase snowflake-connector-python dependency to 3.7 (#4008)
Browse files Browse the repository at this point in the history
* increase snowflake-connector-python to 3.7

Signed-off-by: Chester Ong <[email protected]>

* force_return_table to True

Signed-off-by: Chester Ong <[email protected]>

---------

Signed-off-by: Chester Ong <[email protected]>
  • Loading branch information
bushwhackr authored Mar 11, 2024
1 parent 924f944 commit 2076938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions sdk/python/feast/infra/offline_stores/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,20 +470,9 @@ def _to_df_internal(self, timeout: Optional[int] = None) -> pd.DataFrame:
return df

def _to_arrow_internal(self, timeout: Optional[int] = None) -> pyarrow.Table:
pa_table = execute_snowflake_statement(
return execute_snowflake_statement(
self.snowflake_conn, self.to_sql()
).fetch_arrow_all(force_return_table=False)

if pa_table:
return pa_table
else:
empty_result = execute_snowflake_statement(
self.snowflake_conn, self.to_sql()
)

return pyarrow.Table.from_pandas(
pd.DataFrame(columns=[md.name for md in empty_result.description])
)
).fetch_arrow_all(force_return_table=True)

def to_sql(self) -> str:
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
BYTEWAX_REQUIRED = ["bytewax==0.15.1", "docker>=5.0.2", "kubernetes<=20.13.0"]

SNOWFLAKE_REQUIRED = [
"snowflake-connector-python[pandas]>=3,<4",
"snowflake-connector-python[pandas]>=3.7,<4",
]

SPARK_REQUIRED = [
Expand Down

0 comments on commit 2076938

Please sign in to comment.