Skip to content

Commit 294d96f

Browse files
SNOW-2437173 Enable asfreq for autoswitching on unsupported args (#3976)
1 parent 2fad93e commit 294d96f

File tree

4 files changed

+356
-25
lines changed

4 files changed

+356
-25
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@
5050
- `pivot_table()` with `sort=True`, non-string `index` list, non-string `columns` list, non-string `values` list, or `aggfunc` dict with non-string values
5151
- `fillna()` with `downcast` parameter or using `limit` together with `value`
5252
- `dropna()` with `axis=1`
53+
- `asfreq()` with `how` parameter, `fill_value` parameter, `normalize=True`, or `freq` parameter being week, month, quarter, or year
5354
- `groupby()` with `axis=1`, `by!=None and level!=None`, or by containing any non-pandas hashable labels.
5455
- `groupby_fillna()` with `downcast` parameter
5556
- `groupby_first()` with `min_count>1`
5657
- `groupby_last()` with `min_count>1`
57-
- `shift()` with `freq` parameter
58+
- `groupby_shift()` with `freq` parameter
5859
- Slightly improved the performance of `agg`, `nunique`, `describe`, and related methods on 1-column DataFrame and Series objects.
5960

6061
#### Bug Fixes

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15072,6 +15072,30 @@ def rank(
1507215072

1507315073
return SnowflakeQueryCompiler(new_frame)
1507415074

15075+
@register_query_compiler_method_not_implemented(
15076+
"BasePandasDataset",
15077+
"asfreq",
15078+
UnsupportedArgsRule(
15079+
unsupported_conditions=[
15080+
(
15081+
lambda args: args.get("how") is not None,
15082+
"the 'how' parameter is not yet supported",
15083+
),
15084+
("normalize", True),
15085+
(
15086+
lambda args: args.get("fill_value") is not None,
15087+
"the 'fill_value' parameter is not yet supported",
15088+
),
15089+
(
15090+
lambda args: rule_to_snowflake_width_and_slice_unit(
15091+
args.get("freq")
15092+
)[1]
15093+
not in RULE_SECOND_TO_DAY,
15094+
"the 'freq' parameter does not support week, month, quarter, or year",
15095+
),
15096+
],
15097+
),
15098+
)
1507515099
def asfreq(
1507615100
self,
1507715101
freq: str,

0 commit comments

Comments
 (0)