Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Chien <stdrc@outlook.com>
  • Loading branch information
stdrc committed Dec 18, 2024
1 parent 241096b commit 4e597f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
9 changes: 6 additions & 3 deletions src/stream/tests/integration_tests/eowc_over_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,17 @@ async fn test_over_window() {
// lag(x, 1)
WindowFuncCall {
kind: WindowFuncKind::Aggregate(PbAggKind::FirstValue.into()),
args: AggArgs::from_iter([(DataType::Int32, 3)]),
return_type: DataType::Int32,
args: AggArgs::from_iter([(DataType::Int32, 3)]),
ignore_nulls: false,
frame: Frame::rows(FrameBound::Preceding(1), FrameBound::Preceding(1)),
},
// lead(x, 1)
WindowFuncCall {
kind: WindowFuncKind::Aggregate(PbAggKind::FirstValue.into()),
args: AggArgs::from_iter([(DataType::Int32, 3)]),
return_type: DataType::Int32,
args: AggArgs::from_iter([(DataType::Int32, 3)]),
ignore_nulls: false,
frame: Frame::rows(FrameBound::Following(1), FrameBound::Following(1)),
},
];
Expand Down Expand Up @@ -191,8 +193,9 @@ async fn test_over_window_aggregate() {
let store = MemoryStateStore::new();
let calls = vec![WindowFuncCall {
kind: WindowFuncKind::Aggregate(PbAggKind::Sum.into()),
args: AggArgs::from_iter([(DataType::Int32, 3)]),
return_type: DataType::Int64,
args: AggArgs::from_iter([(DataType::Int32, 3)]),
ignore_nulls: false,
frame: Frame::rows(FrameBound::Preceding(1), FrameBound::Following(1)),
}];

Expand Down
15 changes: 10 additions & 5 deletions src/stream/tests/integration_tests/over_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,17 @@ async fn test_over_window_lag_lead_append_only() {
// lag(x, 1)
WindowFuncCall {
kind: WindowFuncKind::Aggregate(PbAggKind::FirstValue.into()),
args: AggArgs::from_iter([(DataType::Int32, 3)]),
return_type: DataType::Int32,
args: AggArgs::from_iter([(DataType::Int32, 3)]),
ignore_nulls: false,
frame: Frame::rows(FrameBound::Preceding(1), FrameBound::Preceding(1)),
},
// lead(x, 1)
WindowFuncCall {
kind: WindowFuncKind::Aggregate(PbAggKind::FirstValue.into()),
args: AggArgs::from_iter([(DataType::Int32, 3)]),
return_type: DataType::Int32,
args: AggArgs::from_iter([(DataType::Int32, 3)]),
ignore_nulls: false,
frame: Frame::rows(FrameBound::Following(1), FrameBound::Following(1)),
},
];
Expand Down Expand Up @@ -221,15 +223,17 @@ async fn test_over_window_lag_lead_with_updates() {
// lag(x, 1)
WindowFuncCall {
kind: WindowFuncKind::Aggregate(PbAggKind::FirstValue.into()),
args: AggArgs::from_iter([(DataType::Int32, 3)]),
return_type: DataType::Int32,
args: AggArgs::from_iter([(DataType::Int32, 3)]),
ignore_nulls: false,
frame: Frame::rows(FrameBound::Preceding(1), FrameBound::Preceding(1)),
},
// lead(x, 1)
WindowFuncCall {
kind: WindowFuncKind::Aggregate(PbAggKind::FirstValue.into()),
args: AggArgs::from_iter([(DataType::Int32, 3)]),
return_type: DataType::Int32,
args: AggArgs::from_iter([(DataType::Int32, 3)]),
ignore_nulls: false,
frame: Frame::rows(FrameBound::Following(1), FrameBound::Following(1)),
},
];
Expand Down Expand Up @@ -396,8 +400,9 @@ async fn test_over_window_sum() {
// )
WindowFuncCall {
kind: WindowFuncKind::Aggregate(PbAggKind::Sum.into()),
args: AggArgs::from_iter([(DataType::Int32, 3)]),
return_type: DataType::Int64,
args: AggArgs::from_iter([(DataType::Int32, 3)]),
ignore_nulls: false,
frame: Frame::rows_with_exclusion(
FrameBound::Preceding(1),
FrameBound::Following(2),
Expand Down

0 comments on commit 4e597f5

Please sign in to comment.