Skip to content

Commit 56a76ae

Browse files
fix errors
1 parent a19b5a6 commit 56a76ae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,8 @@ def _raise_not_implemented_error_for_timedelta(
833833
method = inspect.currentframe().f_back.f_back.f_code.co_name # type: ignore[union-attr]
834834
ErrorMessage.not_implemented_for_timedelta(method)
835835

836-
def _warn_lost_snowpark_pandas_type(self) -> None:
836+
def _warn_lost_snowpark_pandas_type(self, method: str) -> None:
837837
"""Warn Snowpark pandas type can be lost in current operation."""
838-
method = inspect.currentframe().f_back.f_back.f_code.co_name # type: ignore[union-attr]
839838
snowpark_pandas_types = [
840839
type(t).__name__
841840
for t in set(
@@ -2281,7 +2280,7 @@ def to_snowflake(
22812280
index_label: Optional[IndexLabel] = None,
22822281
table_type: Literal["", "temp", "temporary", "transient"] = "",
22832282
) -> None:
2284-
self._warn_lost_snowpark_pandas_type()
2283+
self._warn_lost_snowpark_pandas_type("to_snowflake")
22852284
handle_if_exists_for_to_snowflake(if_exists=if_exists, name=name)
22862285

22872286
if if_exists == "fail":
@@ -2335,7 +2334,7 @@ def _to_snowpark_internal(
23352334

23362335
For details, please see comment in _to_snowpark_dataframe_of_pandas_dataframe.
23372336
"""
2338-
self._warn_lost_snowpark_pandas_type()
2337+
self._warn_lost_snowpark_pandas_type("to_snowpark")
23392338

23402339
return self._to_snowpark_dataframe_from_snowpark_pandas_dataframe(
23412340
index, index_label

0 commit comments

Comments
 (0)