Skip to content

Commit

Permalink
test: test std(1.0::float64) instead of std(1.0) for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsofun committed Mar 4, 2023
1 parent 8c6c903 commit 2588104
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/query/functions/tests/it/aggregates/agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,12 @@ fn test_agg_retention(file: &mut impl Write, simulator: impl AggregationSimulato
fn test_agg_stddev_pop(file: &mut impl Write, simulator: impl AggregationSimulator) {
run_agg_ast(file, "stddev_pop(a)", get_example().as_slice(), simulator);
run_agg_ast(file, "stddev(x_null)", get_example().as_slice(), simulator);
run_agg_ast(file, "std(1.0)", get_example().as_slice(), simulator);
run_agg_ast(
file,
"std(1.0::float64)",
get_example().as_slice(),
simulator,
);
}

fn test_agg_window_funnel(file: &mut impl Write, simulator: impl AggregationSimulator) {
Expand Down
10 changes: 9 additions & 1 deletion src/query/functions/tests/it/aggregates/testdata/agg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,15 @@ evaluation (internal):
+--------+-------------------------------------------------------------------------+


error: AggregateStddevPopFunction does not support type 'Decimal(Decimal128(DecimalSize { precision: 2, scale: 1 }))'
ast: std(1.0::float64)
evaluation (internal):
+--------+-----------------------------------------------------------------+
| Column | Data |
+--------+-----------------------------------------------------------------+
| a | Int64([4, 3, 2, 1]) |
| Output | NullableColumn { column: Float64([0]), validity: [0b_______1] } |
+--------+-----------------------------------------------------------------+


ast: window_funnel(2)(dt, event1, event2, event3)
evaluation (internal):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,15 @@ evaluation (internal):
+--------+-------------------------------------------------------------------------+


error: AggregateStddevPopFunction does not support type 'Decimal(Decimal128(DecimalSize { precision: 2, scale: 1 }))'
ast: std(1.0::float64)
evaluation (internal):
+--------+--------------------------------------------------------------------+
| Column | Data |
+--------+--------------------------------------------------------------------+
| a | Int64([4, 3, 2, 1]) |
| Output | NullableColumn { column: Float64([0, 0]), validity: [0b______11] } |
+--------+--------------------------------------------------------------------+


ast: window_funnel(2)(dt, event1, event2, event3)
evaluation (internal):
Expand Down

0 comments on commit 2588104

Please sign in to comment.