Skip to content

Commit b31c667

Browse files
committed
add to_timedelta
1 parent 441aa05 commit b31c667

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/unit/core/compile/sqlglot/aggregations/test_unary_compiler.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,17 @@ def test_max(scalar_types_df: bpd.DataFrame, snapshot):
5757

5858

5959
def test_mean(scalar_types_df: bpd.DataFrame, snapshot):
60-
bf_df = scalar_types_df[["int64_col", "bool_col", "duration_col"]]
61-
# bf_df["duration_col"] = bpd.to_timedelta(bf_df["duration_col"], unit="us")
60+
# bf_df = scalar_types_df[["int64_col", "bool_col", "duration_col"]]
61+
bf_df = scalar_types_df[["duration_col"]]
62+
bf_df["duration_col"] = bpd.to_timedelta(bf_df["duration_col"], unit="us")
6263

6364
agg_ops_map = {
64-
"int64_col": agg_ops.MeanOp().as_expr("int64_col"),
65-
"bool_col": agg_ops.MeanOp().as_expr("bool_col"),
65+
# "int64_col": agg_ops.MeanOp().as_expr("int64_col"),
66+
# "bool_col": agg_ops.MeanOp().as_expr("bool_col"),
6667
"duration_col": agg_ops.MeanOp().as_expr("duration_col"),
67-
"int64_col_w_floor": agg_ops.MeanOp(should_floor_result=True).as_expr(
68-
"int64_col"
69-
),
68+
# "int64_col_w_floor": agg_ops.MeanOp(should_floor_result=True).as_expr(
69+
# "int64_col"
70+
# ),
7071
}
7172
sql = _apply_unary_agg_ops(
7273
bf_df, list(agg_ops_map.values()), list(agg_ops_map.keys())

0 commit comments

Comments
 (0)