icydb-core 0.144.7

IcyDB — A schema-first typed query engine and persistence runtime for Internet Computer canisters
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
use super::support::*;
use crate::db::query::plan::expr::CaseWhenArm;

#[test]
fn plan_hash_snapshot_is_stable_across_explain_surfaces() {
    // Phase 1: build one deterministic scalar query shape and capture baseline hash surfaces.
    let query = Query::<PlanSingleton>::new(MissingRowPolicy::Ignore).by_id(Unit);

    let baseline_hash = query
        .plan_hash_hex()
        .expect("baseline plan hash should build");
    let planned_hash = query
        .planned()
        .expect("planned query should build for hash parity")
        .plan_hash_hex();
    let compiled_hash = query
        .plan()
        .expect("compiled query should build for hash parity")
        .plan_hash_hex();

    // Phase 2: force logical + execution explain surfaces for the same query shape.
    let _logical_explain = query
        .explain()
        .expect("logical explain should build for plan-hash parity lock");
    let _execution_text = query
        .explain_execution_text()
        .expect("execution text explain should build for plan-hash parity lock");
    let _execution_json = query
        .explain_execution_json()
        .expect("execution json explain should build for plan-hash parity lock");
    let _execution_verbose = query
        .explain_execution_verbose()
        .expect("execution verbose explain should build for plan-hash parity lock");

    // Phase 3: re-read hash after explain rendering and lock deterministic parity.
    let hash_after_explain = query
        .plan_hash_hex()
        .expect("plan hash should still build after explain rendering");
    assert_eq!(
        baseline_hash, planned_hash,
        "planned-query plan hash must match query plan-hash surface",
    );
    assert_eq!(
        baseline_hash, compiled_hash,
        "compiled-query plan hash must match query plan-hash surface",
    );
    assert_eq!(
        baseline_hash, hash_after_explain,
        "explain rendering surfaces must not change semantic plan-hash identity",
    );
    assert_eq!(
        baseline_hash, "d9bb3fd16ea72a87a4ced9d14ab26a9af25ed756cbb5a873270dba36842dd28b",
        "plan-hash snapshot drifted; update only for intentional semantic identity changes",
    );
}

#[test]
fn canonical_equivalent_scalar_filter_shapes_share_query_plan_hash_surfaces() {
    // Phase 1: build two equivalent scalar filter spellings that now normalize
    // onto one canonical boolean filter identity.
    let left = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .filter(FieldRef::new("rank").gte(2_i32))
        .filter(FieldRef::new("rank").lt(10_i32));
    let right = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .filter(FieldRef::new("rank").lt(10_i32))
        .filter(FieldRef::new("rank").gte(2_i32));

    let left_hash = left
        .plan_hash_hex()
        .expect("left canonical-equivalent query should build a plan hash");
    let right_hash = right
        .plan_hash_hex()
        .expect("right canonical-equivalent query should build a plan hash");

    // Phase 2: require the public query, planned-query, compiled-query, and
    // explain surfaces to follow the same canonical scalar filter identity.
    assert_eq!(
        left_hash, right_hash,
        "canonical-equivalent scalar filter spellings must share the outward query plan hash",
    );
    assert_eq!(
        left.planned()
            .expect("left planned query should build for canonical parity")
            .plan_hash_hex(),
        right
            .planned()
            .expect("right planned query should build for canonical parity")
            .plan_hash_hex(),
        "planned-query hash surface must follow the same canonical scalar filter identity",
    );
    assert_eq!(
        left.plan()
            .expect("left compiled query should build for canonical parity")
            .plan_hash_hex(),
        right
            .plan()
            .expect("right compiled query should build for canonical parity")
            .plan_hash_hex(),
        "compiled-query hash surface must follow the same canonical scalar filter identity",
    );
    assert_eq!(
        left.explain()
            .expect("left explain should build for canonical parity"),
        right
            .explain()
            .expect("right explain should build for canonical parity"),
        "logical explain output must follow the same canonical scalar filter identity",
    );
}

#[test]
fn canonical_equivalent_grouped_having_shapes_share_query_plan_hash_surfaces() {
    // Phase 1: build two grouped queries whose HAVING clauses are semantically
    // identical but arrive through different append order.
    let left = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .group_by("rank")
        .expect("left grouped query should resolve group field")
        .aggregate(crate::db::count())
        .having_group(
            "rank",
            CompareOp::Gte,
            crate::value::InputValue::from(Value::Int(2)),
        )
        .expect("left grouped query should accept grouped field HAVING")
        .having_aggregate(
            0,
            CompareOp::Gt,
            crate::value::InputValue::from(Value::Uint(0)),
        )
        .expect("left grouped query should accept grouped aggregate HAVING");
    let right = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .group_by("rank")
        .expect("right grouped query should resolve group field")
        .aggregate(crate::db::count())
        .having_aggregate(
            0,
            CompareOp::Gt,
            crate::value::InputValue::from(Value::Uint(0)),
        )
        .expect("right grouped query should accept grouped aggregate HAVING")
        .having_group(
            "rank",
            CompareOp::Gte,
            crate::value::InputValue::from(Value::Int(2)),
        )
        .expect("right grouped query should accept grouped field HAVING");

    let left_hash = left
        .plan_hash_hex()
        .expect("left grouped query should build a plan hash");
    let right_hash = right
        .plan_hash_hex()
        .expect("right grouped query should build a plan hash");

    // Phase 2: require grouped hash/explain surfaces to follow the same
    // canonical HAVING identity rather than append order.
    assert_eq!(
        left_hash, right_hash,
        "canonical-equivalent grouped HAVING order must share the outward query plan hash",
    );
    assert_eq!(
        left.planned()
            .expect("left grouped planned query should build for canonical parity")
            .plan_hash_hex(),
        right
            .planned()
            .expect("right grouped planned query should build for canonical parity")
            .plan_hash_hex(),
        "planned grouped-query hash surface must follow canonical HAVING identity",
    );
    assert_eq!(
        left.plan()
            .expect("left grouped compiled query should build for canonical parity")
            .plan_hash_hex(),
        right
            .plan()
            .expect("right grouped compiled query should build for canonical parity")
            .plan_hash_hex(),
        "compiled grouped-query hash surface must follow canonical HAVING identity",
    );
    assert_eq!(
        left.explain()
            .expect("left grouped explain should build for canonical parity"),
        right
            .explain()
            .expect("right grouped explain should build for canonical parity"),
        "grouped logical explain must follow the same canonical HAVING identity",
    );
}

#[test]
fn grouped_null_and_false_having_families_keep_distinct_plan_hash_surfaces() {
    let omitted_else_null_family = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .group_by("rank")
        .expect("grouped omitted-ELSE test query should resolve group field")
        .aggregate(crate::db::count())
        .having_expr(Expr::Case {
            when_then_arms: vec![CaseWhenArm::new(
                Expr::Binary {
                    op: crate::db::query::plan::expr::BinaryOp::Gt,
                    left: Box::new(Expr::Aggregate(crate::db::count())),
                    right: Box::new(Expr::Literal(Value::Uint(1))),
                },
                Expr::Literal(Value::Bool(true)),
            )],
            else_expr: Box::new(Expr::Literal(Value::Null)),
        })
        .expect("grouped omitted-ELSE test query should admit the explicit ELSE NULL family");
    let explicit_false_family = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .group_by("rank")
        .expect("grouped explicit-false test query should resolve group field")
        .aggregate(crate::db::count())
        .having_expr(Expr::Binary {
            op: crate::db::query::plan::expr::BinaryOp::Or,
            left: Box::new(Expr::FunctionCall {
                function: crate::db::query::plan::expr::Function::Coalesce,
                args: vec![
                    Expr::Binary {
                        op: crate::db::query::plan::expr::BinaryOp::Gt,
                        left: Box::new(Expr::Aggregate(crate::db::count())),
                        right: Box::new(Expr::Literal(Value::Uint(1))),
                    },
                    Expr::Literal(Value::Bool(false)),
                ],
            }),
            right: Box::new(Expr::Literal(Value::Bool(false))),
        })
        .expect("grouped explicit-false test query should admit the shipped false family");

    assert_ne!(
        omitted_else_null_family
            .plan_hash_hex()
            .expect("grouped omitted-ELSE null-family hash should build"),
        explicit_false_family
            .plan_hash_hex()
            .expect("grouped explicit-false family hash should build"),
        "grouped omitted-ELSE null-family and explicit-false family must stay distinct on outward plan-hash surfaces",
    );
    assert_ne!(
        omitted_else_null_family
            .planned()
            .expect("grouped omitted-ELSE null-family planned query should build")
            .plan_hash_hex(),
        explicit_false_family
            .planned()
            .expect("grouped explicit-false family planned query should build")
            .plan_hash_hex(),
        "planned grouped-query hash surface must keep the grouped null and false families distinct",
    );
    assert_ne!(
        omitted_else_null_family
            .plan()
            .expect("grouped omitted-ELSE null-family compiled query should build")
            .plan_hash_hex(),
        explicit_false_family
            .plan()
            .expect("grouped explicit-false family compiled query should build")
            .plan_hash_hex(),
        "compiled grouped-query hash surface must keep the grouped null and false families distinct",
    );
}

#[test]
fn scalar_queries_with_distinct_projection_shapes_keep_distinct_plan_hash_surfaces() {
    let left = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .select_fields(["rank"])
        .order_term(crate::db::asc("rank"))
        .limit(2);
    let right = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .select_fields(["id"])
        .order_term(crate::db::asc("rank"))
        .limit(2);

    assert_ne!(
        left.plan_hash_hex()
            .expect("left scalar projection hash should build"),
        right
            .plan_hash_hex()
            .expect("right scalar projection hash should build"),
        "distinct scalar projection shapes must remain distinct on outward plan-hash surfaces",
    );
    assert_ne!(
        left.planned()
            .expect("left planned projection should build")
            .plan_hash_hex(),
        right
            .planned()
            .expect("right planned projection should build")
            .plan_hash_hex(),
        "planned-query hash surface must keep distinct scalar projection shapes separate",
    );
    assert_ne!(
        left.plan()
            .expect("left compiled projection should build")
            .plan_hash_hex(),
        right
            .plan()
            .expect("right compiled projection should build")
            .plan_hash_hex(),
        "compiled-query hash surface must keep distinct scalar projection shapes separate",
    );
}

#[test]
fn explain_execution_verbose_reports_top_n_seek_hints() {
    let verbose = Query::<PlanNumericEntity>::new(MissingRowPolicy::Ignore)
        .order_term(crate::db::desc("id"))
        .offset(2)
        .limit(3)
        .explain_execution_verbose()
        .expect("top-n verbose explain should build");

    let diagnostics = verbose_diagnostics_map(&verbose);
    assert_eq!(
        diagnostics.get("diag.r.top_n_seek"),
        Some(&"fetch(6)".to_string()),
        "verbose execution explain should freeze top-n seek fetch diagnostics",
    );
    assert_eq!(
        diagnostics.get("diag.d.has_top_n_seek"),
        Some(&"true".to_string()),
        "descriptor diagnostics should report TopNSeek node presence",
    );
}

#[test]
fn expression_casefold_eq_access_and_execution_route_stay_in_parity() {
    let predicate = Predicate::Compare(ComparePredicate::with_coercion(
        "email",
        CompareOp::Eq,
        Value::Text("ALICE@EXAMPLE.COM".to_string()),
        CoercionId::TextCasefold,
    ));

    let explain = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate.clone())
        .explain()
        .expect("expression eq explain should build");
    let ExplainAccessPath::IndexPrefix {
        name,
        fields,
        prefix_len,
        values,
    } = explain.access()
    else {
        panic!("expression eq should lower to index-prefix access");
    };
    assert_eq!(name, &PLAN_EXPRESSION_CASEFOLD_INDEX_MODELS[0].name());
    assert_eq!(fields.as_slice(), ["email"]);
    assert_eq!(*prefix_len, 1);
    assert_eq!(
        values.as_slice(),
        [Value::Text("alice@example.com".to_string())]
    );

    let verbose = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate.clone())
        .explain_execution_verbose()
        .expect("expression eq verbose explain should build");
    let diagnostics = verbose_diagnostics_map(&verbose);
    assert_expression_access_choice_selected(&diagnostics, "IndexPrefix(email_expr)");

    let execution = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate)
        .explain_execution()
        .expect("expression eq execution explain should build");
    assert!(
        explain_execution_contains_node_type(&execution, ExplainExecutionNodeType::IndexPrefixScan),
        "execution route must preserve expression eq index-prefix route selection",
    );
}

#[test]
fn expression_casefold_in_access_and_execution_route_stay_in_parity() {
    let predicate = Predicate::Compare(ComparePredicate::with_coercion(
        "email",
        CompareOp::In,
        Value::List(vec![
            Value::Text("BOB@EXAMPLE.COM".to_string()),
            Value::Text("alice@example.com".to_string()),
            Value::Text("bob@example.com".to_string()),
        ]),
        CoercionId::TextCasefold,
    ));

    let explain = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate.clone())
        .explain()
        .expect("expression IN explain should build");
    let ExplainAccessPath::IndexMultiLookup {
        name,
        fields,
        values,
    } = explain.access()
    else {
        panic!("expression IN should lower to index-multi-lookup access");
    };
    assert_eq!(name, &PLAN_EXPRESSION_CASEFOLD_INDEX_MODELS[0].name());
    assert_eq!(fields.as_slice(), ["email"]);
    assert_eq!(
        values.as_slice(),
        [
            Value::Text("alice@example.com".to_string()),
            Value::Text("bob@example.com".to_string())
        ],
    );

    let verbose = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate.clone())
        .explain_execution_verbose()
        .expect("expression IN verbose explain should build");
    let diagnostics = verbose_diagnostics_map(&verbose);
    assert_expression_access_choice_selected(&diagnostics, "IndexMultiLookup(email_expr)");

    let execution = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate)
        .explain_execution()
        .expect("expression IN execution explain should build");
    assert!(
        explain_execution_contains_node_type(
            &execution,
            ExplainExecutionNodeType::IndexMultiLookup
        ),
        "execution route must preserve expression IN index-multi-lookup route selection",
    );
}

#[test]
fn expression_casefold_starts_with_access_and_execution_route_stay_in_parity() {
    let predicate = Predicate::Compare(ComparePredicate::with_coercion(
        "email",
        CompareOp::StartsWith,
        Value::Text("ALI".to_string()),
        CoercionId::TextCasefold,
    ));

    let explain = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate.clone())
        .explain()
        .expect("expression starts-with explain should build");
    let ExplainAccessPath::IndexRange {
        name,
        fields,
        prefix_len,
        prefix,
        lower,
        upper,
    } = explain.access()
    else {
        panic!("expression starts-with should lower to index-range access");
    };
    assert_eq!(name, &PLAN_EXPRESSION_CASEFOLD_INDEX_MODELS[0].name());
    assert_eq!(fields.as_slice(), ["email"]);
    assert_eq!(*prefix_len, 0);
    assert!(
        prefix.is_empty(),
        "expression starts-with range should not carry equality prefix values",
    );
    assert!(matches!(
        lower,
        std::ops::Bound::Included(Value::Text(value)) if value == "ali"
    ));
    assert!(matches!(upper, std::ops::Bound::Unbounded));

    let verbose = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate.clone())
        .explain_execution_verbose()
        .expect("expression starts-with verbose explain should build");
    let diagnostics = verbose_diagnostics_map(&verbose);
    assert_expression_access_choice_selected(&diagnostics, "IndexRange(email_expr)");
    assert_eq!(
        diagnostics.get("diag.r.predicate_stage"),
        Some(&"index_prefilter(strict_all_or_none)".to_string()),
        "text-casefold expression starts-with should keep the shared strict prefilter stage",
    );
    assert_eq!(
        diagnostics.get("diag.d.has_index_predicate_prefilter"),
        Some(&"true".to_string()),
        "text-casefold expression starts-with should compile the shared strict index prefilter",
    );
    assert_eq!(
        diagnostics.get("diag.d.has_residual_filter"),
        Some(&"false".to_string()),
        "text-casefold expression starts-with should no longer require a residual predicate filter",
    );

    let execution = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate)
        .explain_execution()
        .expect("expression starts-with execution explain should build");
    assert!(
        explain_execution_contains_node_type(&execution, ExplainExecutionNodeType::IndexRangeScan),
        "execution route must preserve expression starts-with index-range route selection",
    );
}

#[test]
fn expression_casefold_starts_with_single_char_prefix_keeps_index_range_route() {
    let predicate = Predicate::Compare(ComparePredicate::with_coercion(
        "email",
        CompareOp::StartsWith,
        Value::Text("A".to_string()),
        CoercionId::TextCasefold,
    ));

    let explain = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate.clone())
        .explain()
        .expect("single-char expression starts-with explain should build");
    let ExplainAccessPath::IndexRange {
        name, lower, upper, ..
    } = explain.access()
    else {
        panic!("single-char expression starts-with should lower to index-range access");
    };
    assert_eq!(name, &PLAN_EXPRESSION_CASEFOLD_INDEX_MODELS[0].name());
    assert!(matches!(
        lower,
        std::ops::Bound::Included(Value::Text(value)) if value == "a"
    ));
    assert!(matches!(upper, std::ops::Bound::Unbounded));

    let execution = Query::<PlanExpressionCasefoldEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(predicate)
        .explain_execution()
        .expect("single-char expression starts-with execution explain should build");
    assert!(
        explain_execution_contains_node_type(&execution, ExplainExecutionNodeType::IndexRangeScan),
        "single-char expression starts-with must keep index-range route selection",
    );
}

#[test]
fn explain_execution_text_and_json_surfaces_are_stable() {
    let id = Ulid::from_u128(9_101);
    let query = Query::<PlanSimpleEntity>::new(MissingRowPolicy::Ignore).by_id(id);
    let descriptor = query
        .explain_execution()
        .expect("execution descriptor explain should build");

    let text = query
        .explain_execution_text()
        .expect("execution text explain should build");
    assert!(
        text.contains("ByKeyLookup"),
        "execution text surface should expose access-root node type"
    );
    assert_eq!(
        text,
        descriptor.render_text_tree(),
        "execution text surface should be canonical descriptor text rendering",
    );

    let json = query
        .explain_execution_json()
        .expect("execution json explain should build");
    assert!(
        json.contains("\"node_type\":\"ByKeyLookup\""),
        "execution json surface should expose canonical root node type"
    );
    assert_eq!(
        json,
        descriptor.render_json_canonical(),
        "execution json surface should be canonical descriptor json rendering",
    );
}

#[test]
fn secondary_in_explain_uses_index_multi_lookup_access_shape() {
    let explain = Query::<PlanPushdownEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(Predicate::Compare(ComparePredicate::with_coercion(
            "group",
            CompareOp::In,
            Value::List(vec![Value::Uint(7), Value::Uint(8), Value::Uint(9)]),
            CoercionId::Strict,
        )))
        .explain()
        .expect("secondary IN explain should build");

    assert!(
        matches!(explain.access(), ExplainAccessPath::IndexMultiLookup { .. }),
        "secondary IN predicates should lower to the dedicated index-multi-lookup access shape",
    );
}

#[test]
fn secondary_or_eq_explain_uses_index_multi_lookup_access_shape() {
    let explain = Query::<PlanPushdownEntity>::new(MissingRowPolicy::Ignore)
        .filter_predicate(Predicate::Or(vec![
            Predicate::Compare(ComparePredicate::with_coercion(
                "group",
                CompareOp::Eq,
                Value::Uint(8),
                CoercionId::Strict,
            )),
            Predicate::Compare(ComparePredicate::with_coercion(
                "group",
                CompareOp::Eq,
                Value::Uint(7),
                CoercionId::Strict,
            )),
            Predicate::Compare(ComparePredicate::with_coercion(
                "group",
                CompareOp::Eq,
                Value::Uint(8),
                CoercionId::Strict,
            )),
        ]))
        .explain()
        .expect("secondary OR equality explain should build");

    assert!(
        matches!(explain.access(), ExplainAccessPath::IndexMultiLookup { .. }),
        "same-field strict OR equality should lower to index-multi-lookup access shape",
    );
}