apurtell commented on PR #2505:
URL: https://github.com/apache/phoenix/pull/2505#issuecomment-4661977313
## What changed
- `ExplainPlanAttributes.java` — added four fields (`indexName`,
`indexKind`, `saltBuckets`, `regionsPlanned`) with getters, builder setters,
copy-builder entries, all-args ctor + no-arg ctor wiring, and slotted them into
`@JsonPropertyOrder` right after `keyRanges`. Verified zero direct ctor callers
(only the no-arg singleton and the builder).
- `ExplainTable.java` — added a default `protected int getSplitCount() {
return 0; }` and a renderer block that, after the `CLIENT ...` line and before
`ROW TIMESTAMP FILTER`, emits:
- `INDEX <name> [<kind>]` (always; kind token only for index tables:
`LOCAL` / `GLOBAL` / `UNCOVERED GLOBAL`, with local-index view-id name
stripping reused),
- `SALT BUCKETS <n>` (when `getBucketNum() != null`),
- `REGIONS PLANNED <n>` (when `getSplitCount() > 0`),
and mirrors each onto the builder.
- `BaseResultIterators.java` — overrides `getSplitCount()` to return
`splits.size()`.
**Test infrastructure (`phoenix-core`)**
- `ExplainTextNormalizer.java` — normalizes `REGIONS PLANNED <digits>` →
`REGIONS PLANNED <N>`.
- `ExplainJsonNormalizer.java` — nulls `regionsPlanned` (mirrors
`splitsChunk`).
- `ExplainPlanTestUtil.java` — added `.indexName()`, `.indexKind()`,
`.saltBuckets()`, `.regionsPlanned()` fluent assertions.
- `ExplainPlanTest.java` — updated all 41 backward-compat cases (text + JSON
via `scanAttrs`/`defaultAttrs`), and added 3 new tests for `GLOBAL`, `LOCAL`,
and `UNCOVERED GLOBAL` index kinds (attribute-based for robustness).
## Test Results
| Suite | Result |
|---|---|
| `ExplainPlanTest` (connectionless) | 62/62 pass |
| `QueryPlanTest` | 4/4 pass |
| `QueryCompilerTest` | 215 pass (2 skipped) |
| `QueryOptimizerTest` | 49 pass (1 skipped) |
| `ExplainPlanWithStatsEnabledIT` (real minicluster) | 28/28 pass |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]