Commit 0e23b2e
committed
fix(translator): Hash identity-key percentage splits without a context identity
A PERCENTAGE_SPLIT keyed on the identity (implicit `$.identity.key`,
`$.identity.key`, or `$.identity.identifier`) compiled to FALSE when the
evaluation context carried no identity. But the translated predicate runs
per-row over IDENTITIES, where the identity-key and identifier columns are
always present, so it should hash the row column regardless of whether the
row-oriented context supplies an identity. The guard made row-oriented
callers (segment-membership counts/members) see every percentage-split
segment as empty.
Drop the eval-context identity guard for those three cases and emit the
per-row hash. Trait-keyed splits are unchanged.
No engine-test-data case translates a percentage split with an
identity-less context, so the SQL for every parity case is byte-identical
(the guard was always passing there) and no _XFAIL_CASE_NAMES entries are
needed. This does intentionally diverge from flag_engine's single-eval
"no identity -> False" for the identity-less case, which is correct for the
row-oriented SQL engine where every row is an identity.
beep boop
Claude-Session: https://claude.ai/code/session_01EgZ5iHpDASZzCapiHRxHLB1 parent cfc3d4e commit 0e23b2e
2 files changed
Lines changed: 32 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
443 | 442 | | |
444 | 443 | | |
445 | | - | |
446 | | - | |
447 | 444 | | |
448 | 445 | | |
449 | | - | |
450 | | - | |
451 | 446 | | |
452 | 447 | | |
453 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
546 | | - | |
547 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
| |||
556 | 557 | | |
557 | 558 | | |
558 | 559 | | |
559 | | - | |
560 | | - | |
| 560 | + | |
| 561 | + | |
561 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
562 | 569 | | |
563 | | - | |
564 | | - | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
565 | 573 | | |
566 | 574 | | |
567 | 575 | | |
| |||
575 | 583 | | |
576 | 584 | | |
577 | 585 | | |
578 | | - | |
579 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
580 | 591 | | |
581 | 592 | | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
586 | 596 | | |
587 | 597 | | |
588 | 598 | | |
| |||
600 | 610 | | |
601 | 611 | | |
602 | 612 | | |
603 | | - | |
604 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
605 | 618 | | |
606 | 619 | | |
607 | 620 | | |
| |||
0 commit comments