microbluey opened a new pull request, #5224:
URL: https://github.com/apache/calcite/pull/5224

   `RelOptUtil.dumpPlan(..., JSON)` throws `UnsupportedOperationException` for 
any plan whose `LogicalTableScan` carries hints: 
`LogicalTableScan.explainTerms` emits a `hints` item (added for the 
CALCITE-4581 digest fix), but `RelJson.toJson(Object)` has no branch for 
`RelHint`. Reading such a plan back silently dropped the hints.
   
   - `RelJson`: serialize `RelHint` (name, inheritPath, list/kv options, 
position when not ZERO); `toHint`/`toHints` for reading back
   - `RelInput`: new `getHints()` with an empty default, so existing 
implementations are unaffected
   - `RelJsonReader` reads the `hints` entry; `TableScan(RelInput)` passes it 
through, so hints survive the round trip
   
   Only `LogicalTableScan` emits `hints` in explain output today; other 
`Hintable` nodes put hints in their digest, which does not go through 
`RelJsonWriter`.
   
   Test: `RelJsonTest.testHint` — SQL with a table hint, dump to JSON 
(previously threw), read back through `RelJsonReader`, assert hints round-trip.
   


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