Commit 475fc9f
committed
[analytics-engine] Add ShardBucketOversamplingIT for shard-bucket oversampling
End-to-end coverage for the shard-bucket-oversampling rule against a 2-shard
parquet-backed index.
- Setting wiring + validation: default factor / factor=0 / factor=1.0 / factor=3.0 /
invalid-factor (rejected at create-time) / dynamic update.
- Pass-through path: `stats sum(value) as total by category | sort - total | head 100`
over a 6-doc index — asserts `{a:5, b:7, c:9}`.
- Decomposed path: `stats avg(value) as avg_v by category | sort - avg_v | head 100` —
asserts `{a:2.5, b:3.5, c:4.5}` on both default-factor (rule fires) and factor=0
(rule disabled) paths.
- Engine-native-merge path: `stats dc(value) as dc_v by category | sort - dc_v | head 100`
over an index with 30 distinct values per category — asserts `{a:30, b:30, c:30}` on
both default-factor (SHARD_MERGE + hll_estimate) and factor=0 (PARTIAL→FINAL) paths.
HLL is exact above its sparse-mode regime; 30 distinct per category sits well inside
that regime.
Polling helper waits for `SUM(value) BY category` to stabilize before each assertion fires
(parquet rowgroup commit timing is asynchronous to refresh).
Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>1 parent 7603235 commit 475fc9f
1 file changed
Lines changed: 425 additions & 0 deletions
File tree
- sandbox/qa/analytics-engine-rest/src/test/java/org/opensearch/analytics/qa
0 commit comments