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() {
235
235
. await
236
236
. unwrap ( ) ;
237
237
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 ( ) ;
241
242
242
243
let logs = read_logs ( & module) . await ;
243
244
@@ -249,7 +250,7 @@ fn test_index_scans() {
249
250
assert ! ( timing( & logs[ 0 ] ) ) ;
250
251
assert ! ( timing( & logs[ 1 ] ) ) ;
251
252
assert ! ( timing( & logs[ 2 ] ) ) ;
252
- // assert!(timing(&logs[3]));
253
+ assert ! ( timing( & logs[ 3 ] ) ) ;
253
254
} ,
254
255
) ;
255
256
}
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) {
63
63
let z = CHUNK as i32 ;
64
64
let dimension = ID as u32 ;
65
65
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 ( ) ;
72
67
span. end ( ) ;
73
68
assert_eq ! ( n, 1 ) ;
74
69
}
@@ -78,7 +73,7 @@ pub fn test_index_scan_on_x_z_dimension(ctx: &ReducerContext) {
78
73
pub fn test_index_scan_on_x_z ( ctx : & ReducerContext ) {
79
74
let z = CHUNK as i32 ;
80
75
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 ( ) ;
82
77
span. end ( ) ;
83
78
assert_eq ! ( n as u64 , ROWS_PER_CHUNK ) ;
84
79
}
You can’t perform that action at this time.
0 commit comments