Commit 5bc0b2f
committed
Acknowledge percentile divergence on analytics-engine path
Three percentile-related tests fail on the force-routed analytics-engine
path for reasons that are not test-side fixable in this PR's scope:
- testStatsPercentileWithNull: DataFusion's TDigest implementation
interpolates the 50th percentile to 35413 where OpenSearch's TDigest
interpolates to 39225 on the same input. Both values are valid
approximations within TDigest's compression-bound error. Record the
per-engine value via isAnalyticsForceRoutingEnabled() so the test
documents the divergence rather than masking it.
- testStatsPercentileBySpan: same TDigest divergence shows up on the
age=30 bucket (33194 on analytics vs 39225 on legacy). The age=20
bucket happens to coincide. Same per-engine encoding.
- testStatsBySpanTimeWithNullBucket: span(@timestamp, 12h) uses a
multi-unit time interval that the current SpanAdapter doesn't rewrite
(only interval=1 → DATE_TRUNC). Skip via Assume.assumeFalse on
analytics until multi-unit time-span support lands (likely via
DataFusion's date_bin).
These are coordinated with opensearch-project/OpenSearch#21584 commit 5
which fixes the upstream planner-side type mismatch for percentile +
group-by, so the queries now reach the TDigest-divergence assertion
rather than crashing with a 500.
Signed-off-by: Kai Huang <ahkcs@amazon.com>1 parent 7bb6fb3 commit 5bc0b2f
1 file changed
Lines changed: 20 additions & 2 deletions
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
646 | 650 | | |
647 | 651 | | |
648 | 652 | | |
| |||
722 | 726 | | |
723 | 727 | | |
724 | 728 | | |
725 | | - | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
726 | 737 | | |
727 | 738 | | |
728 | 739 | | |
| |||
767 | 778 | | |
768 | 779 | | |
769 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
770 | 788 | | |
771 | 789 | | |
772 | 790 | | |
| |||
0 commit comments