(db: &RelationalDB, indexed: bool)
| 172 | } |
| 173 | |
| 174 | fn create_table_t(db: &RelationalDB, indexed: bool) { |
| 175 | let indexes = &[0.into()]; |
| 176 | let indexes = if indexed { indexes } else { &[] as &[_] }; |
| 177 | let table_id = db |
| 178 | .create_table_for_test("T", &["a", "b"].map(|n| (n, AlgebraicType::U64)), indexes) |
| 179 | .expect("Failed to create table"); |
| 180 | |
| 181 | with_auto_commit(db, |tx| -> Result<(), DBError> { |
| 182 | for i in 0u64..10u64 { |
| 183 | insert(db, tx, table_id, &product![i % 5, i]).expect("failed to insert into table"); |
| 184 | } |
| 185 | Ok(()) |
| 186 | }) |
| 187 | .expect("failed to insert into table"); |
| 188 | } |
| 189 | |
| 190 | #[test] |
| 191 | fn cardinality_estimation_index_lookup() { |
searching dependent graphs…