Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SNOW-902943]: Add support for pd.NamedAgg in groupby.agg #1432

Merged
merged 16 commits into from
May 15, 2024
Merged
11 changes: 10 additions & 1 deletion tests/integ/modin/groupby/test_groupby_named_agg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#
# Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
#
import modin.pandas as pd

import snowflake.snowpark.modin.plugin # noqa: F401
from snowflake.snowpark.exceptions import SnowparkSQLException
from tests.integ.modin.sql_counter import sql_count_checker
from tests.integ.modin.utils import eval_snowpark_pandas_result
Expand All @@ -19,8 +22,13 @@ def test_invalid_named_agg_errors(basic_snowpark_pandas_df):
)


@sql_count_checker(query_count=5)
@sql_count_checker(query_count=6)
def test_invalid_func_with_named_agg_errors(basic_snowpark_pandas_df):
# Temporary workaround until Anaconda uploads the Modin package
sfc-gh-rdurrani marked this conversation as resolved.
Show resolved Hide resolved
custom_package_usage_config = pd.session.custom_package_usage_config.get(
"enabled", False
)
pd.session.custom_package_usage_config["enabled"] = True
eval_snowpark_pandas_result(
basic_snowpark_pandas_df,
basic_snowpark_pandas_df.to_pandas(),
Expand All @@ -29,6 +37,7 @@ def test_invalid_func_with_named_agg_errors(basic_snowpark_pandas_df):
assert_exception_equal=False, # We fallback and then raise the correct error.
expect_exception_type=SnowparkSQLException,
)
pd.session.custom_package_usage_config["enabled"] = custom_package_usage_config


@sql_count_checker(query_count=1)
Expand Down
Loading