Skip to content

Commit

Permalink
more UT's
Browse files Browse the repository at this point in the history
  • Loading branch information
dharanad committed Sep 27, 2024
1 parent 3c47a45 commit be8b69b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ SELECT min_by(x, y) FROM VALUES (1, 10), (2, 5), (3, 15), (4, 8) as tab(x, y);
-- | 2 |
-- +---------------------+

SELECT kurtosis_pop(col) FROM VALUES (1.0), (10.0), (100.0), (10.0), (1.0) as tab(col);
-- Results in
-- +-----------------------+
-- | kurtosis_pop(tab.col) |
-- +-----------------------+
-- | 0.194323231917 |
-- +-----------------------+
```

## Done
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub mod kurtosis_pop;
pub mod max_min_by;
pub mod mode;
pub mod expr_extra_fn {
pub use super::kurtosis_pop::kurtosis_pop;
pub use super::max_min_by::max_by;
pub use super::max_min_by::min_by;
pub use super::mode::mode;
Expand Down
29 changes: 29 additions & 0 deletions tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,5 +279,34 @@ async fn test_kurtosis_pop() {
- +--------------------------------------+
- "| -0.9599999999999755 |"
- +--------------------------------------+
"###);

let actual = execution
.run_and_format("SELECT kurtosis_pop(col) FROM VALUES (1.0) as tab(col)")
.await;
insta::assert_yaml_snapshot!(actual, @r###"
- +-----------------------+
- "| kurtosis_pop(tab.col) |"
- +-----------------------+
- "| |"
- +-----------------------+
"###);

let actual = execution.run_and_format("SELECT kurtosis_pop(1.0)").await;
insta::assert_yaml_snapshot!(actual, @r###"
- +--------------------------+
- "| kurtosis_pop(Float64(1)) |"
- +--------------------------+
- "| |"
- +--------------------------+
"###);

let actual = execution.run_and_format("SELECT kurtosis_pop(null)").await;
insta::assert_yaml_snapshot!(actual, @r###"
- +--------------------+
- "| kurtosis_pop(NULL) |"
- +--------------------+
- "| |"
- +--------------------+
"###);
}

0 comments on commit be8b69b

Please sign in to comment.