yashmayya opened a new pull request, #18661:
URL: https://github.com/apache/pinot/pull/18661

   ## Summary
   
   `pinot-query-planner` carried two byte-for-byte identical copies of the 
`SqlTypeName -> DataSchema.ColumnDataType` mapping switch (and its private 
`resolveDecimal` helper):
   
   - 
`org.apache.pinot.query.planner.logical.RelToPlanNodeConverter#convertToColumnDataType`
   - 
`org.apache.pinot.query.planner.physical.v2.PRelToPlanNodeConverter#convertToColumnDataType`
   
   This is a duplicated source of truth that risks the two type tables silently 
drifting apart (it nearly did during the Calcite 1.42 unsigned-integer-type 
work). Both classes live in the same module and `PRelToPlanNodeConverter` 
already imports from the `logical` package, so there is no module-boundary 
reason for the parallel implementation.
   
   ## Change
   
   `PRelToPlanNodeConverter.toDataSchema` now delegates directly to 
`RelToPlanNodeConverter.convertToColumnDataType`, mirroring how 
`PinotEvaluateLiteralRule` already calls it. The duplicated 
`convertToColumnDataType` / `resolveDecimal` methods — which had no external 
callers — are removed, along with the imports and `LOGGER` field that only they 
used. `RelToPlanNodeConverter.convertToColumnDataType` is now the single source 
of truth.
   
   This is a pure, behavior-preserving refactor: the removed methods were 
identical to the delegation target.
   
   ## Testing
   
   - Full `pinot-query-planner` test suite passes (1248/1248), including 
`RelToPlanNodeConverterTest`, `WorkerManagerTest` (which exercises the v2 
physical-planner path through `PRelToPlanNodeConverter`), and the 
`ResourceBasedQueryPlansTest` plan snapshots (no plan-output drift).
   - `spotless`, `checkstyle`, and `license` checks 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to