apurtell opened a new pull request, #2495:
URL: https://github.com/apache/phoenix/pull/2495

   Add a backward compatibility test harness that freezes Phoenix's `EXPLAIN` 
output and makes any future change to the grammar an explicit, reviewable act.
   
   `ExplainPlanAttributes` gains a `@JsonPropertyOrder` annotation, and 
`RegionLocationsListSerializer` and `ServerMergeColumnsSerializer` handle the 
two attributes that aren't cleanly serializable.
   
   New test package `org.apache.phoenix.query.explain` implements compatibility 
checks. `ExplainOracle` compiles each query against a connectionless Phoenix 
driver and compares both the textual and JSON representations of the plan 
against an expected baseline, producing line-by-line and JSON-pointer diffs on 
mismatch. Normalizers strip environment-specific noise before comparison. 
`ExplainTextNormalizer` collapses parallelism/chunk counts to <N>, removes 
row/byte stats and region-location lines, and `ExplainJsonNormalizer` nulls out 
region locations, lookup counts, split chunks, and row/size estimates and 
recurses into nested join plans.
   
   `ExplainChangeRule` supports future PRs that intentionally change the 
grammar. New rules can be appended that transform the baseline into its new 
expected shape. Every change is intentional and reviewable. The diff in the 
rule itself documents exactly what changed.
   
   The golden text in `ExplainOracleTest` should be periodically regenerated 
with the `ExplainChangeRules` dropped afterward.  So, `ExplainChangeRule` is 
clearly optional. The golden text can simply be updated. However this could be 
a good practice.


-- 
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]

Reply via email to