Commit d3782dc
committed
Branch 7 stats tests on isAnalyticsParquetIndicesEnabled
When -Dtests.analytics.parquet_indices=true is set, every test-created
index is parquet-backed and RestUnifiedQueryAction.isAnalyticsIndex
routes all queries through the analytics-engine backend (DataFusion).
Seven tests need analytics-specific assertions because DataFusion follows
different null-bucket, SQL-spec, and TDigest interpolation semantics
than the legacy V2 / Calcite-DSL paths:
SQL-spec semantics (DataFusion follows the spec; legacy DSL returns 0):
- testSumWithNull — SUM of all-null returns null on analytics; the
existing isPushdownDisabled branch already handles the Calcite-no-
pushdown case. OR analytics into that branch.
- testStatsPercentileByNullValue + NonNullBucket — percentile of an
all-null / empty group returns null on analytics. Same OR pattern.
Non-deterministic head ordering:
- testStatsWithLimit Q1+Q2 — head 5 over a 6-bucket result picks a
different null-balance row than the legacy / Calcite-DSL path; same
effect cascades into `head 2 from 1`. Reuse the size-only assertion
branch already present for the no-pushdown case.
TDigest interpolation divergence (genuine impl difference):
- testStatsPercentileWithNull — DataFusion TDigest interpolates p50 to
35413 vs OpenSearch's 39225; both within compression-bound error.
Per-engine expected value.
- testStatsPercentileBySpan — same TDigest diff on the age=30 bucket
(33194 vs 39225). Coordinated with opensearch-project/OpenSearch#21584
commit 5 which fixes the upstream planner-side type mismatch so the
query reaches the data assertion at all.
Semantic divergence pending team decision:
- testDisableLegacyPreferred — under PPL_SYNTAX_LEGACY_PREFERRED=false,
V2 / Calcite-DSL drop the null-age bucket (5 rows) while DataFusion
keeps it (6 rows). Skipped on the analytics path via
Assume.assumeFalse until the team decides which behaviour is the
intended new-syntax semantics.
Out of scope for this PR (intentionally left failing on the analytics
path so the gap is visible in CI):
- testStatsBySpanTimeWithNullBucket — span(@timestamp, 12h) multi-unit
time interval unsupported in current SpanAdapter (only interval=1 is
rewritten to DATE_TRUNC; multi-unit needs DataFusion's date_bin).
Signed-off-by: Kai Huang <ahkcs@amazon.com>1 parent 56e3395 commit d3782dc
1 file changed
Lines changed: 40 additions & 8 deletions
Lines changed: 40 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
313 | 316 | | |
314 | 317 | | |
315 | 318 | | |
| |||
327 | 330 | | |
328 | 331 | | |
329 | 332 | | |
330 | | - | |
| 333 | + | |
| 334 | + | |
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
| |||
508 | 512 | | |
509 | 513 | | |
510 | 514 | | |
511 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
512 | 518 | | |
513 | 519 | | |
514 | 520 | | |
| |||
635 | 641 | | |
636 | 642 | | |
637 | 643 | | |
638 | | - | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
639 | 649 | | |
640 | 650 | | |
641 | 651 | | |
| |||
674 | 684 | | |
675 | 685 | | |
676 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
677 | 691 | | |
678 | 692 | | |
679 | | - | |
| 693 | + | |
680 | 694 | | |
681 | 695 | | |
682 | 696 | | |
683 | 697 | | |
684 | | - | |
| 698 | + | |
685 | 699 | | |
686 | 700 | | |
687 | 701 | | |
| |||
692 | 706 | | |
693 | 707 | | |
694 | 708 | | |
| 709 | + | |
| 710 | + | |
695 | 711 | | |
696 | 712 | | |
697 | 713 | | |
698 | 714 | | |
699 | 715 | | |
700 | 716 | | |
701 | | - | |
| 717 | + | |
702 | 718 | | |
703 | 719 | | |
704 | 720 | | |
| |||
709 | 725 | | |
710 | 726 | | |
711 | 727 | | |
712 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
713 | 736 | | |
714 | 737 | | |
715 | 738 | | |
| |||
729 | 752 | | |
730 | 753 | | |
731 | 754 | | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
732 | 764 | | |
733 | 765 | | |
734 | 766 | | |
| |||
0 commit comments