File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -235,9 +235,10 @@ fn test_index_scans() {
235235 . await
236236 . unwrap ( ) ;
237237
238- // TODO(1011): Uncomment once multi-column prefix scans are supported
239- // let json = r#"{"call": {"fn": "test_index_scan_on_x_z", "args": []}}"#;
240- // module.send(json.to_string()).await.unwrap();
238+ module
239+ . call_reducer_json ( "test_index_scan_on_x_z" , product ! [ ] )
240+ . await
241+ . unwrap ( ) ;
241242
242243 let logs = read_logs ( & module) . await ;
243244
@@ -249,7 +250,7 @@ fn test_index_scans() {
249250 assert ! ( timing( & logs[ 0 ] ) ) ;
250251 assert ! ( timing( & logs[ 1 ] ) ) ;
251252 assert ! ( timing( & logs[ 2 ] ) ) ;
252- // assert!(timing(&logs[3]));
253+ assert ! ( timing( & logs[ 3 ] ) ) ;
253254 } ,
254255 ) ;
255256}
Original file line number Diff line number Diff line change @@ -63,12 +63,7 @@ pub fn test_index_scan_on_x_z_dimension(ctx: &ReducerContext) {
6363 let z = CHUNK as i32 ;
6464 let dimension = ID as u32 ;
6565 let span = LogStopwatch :: new ( "Index scan on {x, z, dimension}" ) ;
66- let n = ctx
67- . db
68- . location ( )
69- . iter ( )
70- . filter ( |r| r. x == 0 && r. z == z && r. dimension == dimension)
71- . count ( ) ;
66+ let n = ctx. db . location ( ) . coordinates ( ) . filter ( ( 0 , z, dimension) ) . count ( ) ;
7267 span. end ( ) ;
7368 assert_eq ! ( n, 1 ) ;
7469}
@@ -78,7 +73,7 @@ pub fn test_index_scan_on_x_z_dimension(ctx: &ReducerContext) {
7873pub fn test_index_scan_on_x_z ( ctx : & ReducerContext ) {
7974 let z = CHUNK as i32 ;
8075 let span = LogStopwatch :: new ( "Index scan on {x, z}" ) ;
81- let n = ctx. db . location ( ) . iter ( ) . filter ( |r| r . x == 0 && r . z == z ) . count ( ) ;
76+ let n = ctx. db . location ( ) . coordinates ( ) . filter ( ( 0 , z ) ) . count ( ) ;
8277 span. end ( ) ;
8378 assert_eq ! ( n as u64 , ROWS_PER_CHUNK ) ;
8479}
You can’t perform that action at this time.
0 commit comments