Skip to content

Commit

Permalink
Add test for ordered filter query
Browse files Browse the repository at this point in the history
  • Loading branch information
twitu committed Oct 3, 2024
1 parent 4191bd0 commit c712216
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions nautilus_core/persistence/tests/test_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,22 @@ fn test_quote_tick_query() {
assert!(is_monotonically_increasing_by_init(&ticks));
}

#[rstest]
fn test_quote_tick_query_with_filter() {
let file_path = "../../tests/test_data/nautilus/quotes-3-groups-filter-query.parquet";
let mut catalog = DataBackendSession::new(10);
catalog
.add_file::<QuoteTick>(
"quote_005",
file_path,
Some("SELECT * FROM quote_005 WHERE ts_init >= 1701388832486000000"),
)
.unwrap();
let query_result: QueryResult = catalog.get_query_result();
let ticks: Vec<Data> = query_result.collect();
assert!(is_monotonically_increasing_by_init(&ticks));
}

#[rstest]
fn test_quote_tick_multiple_query() {
let expected_length = 9_600;
Expand Down
Binary file not shown.

0 comments on commit c712216

Please sign in to comment.