FrankChen021 commented on PR #20198:
URL: https://github.com/apache/druid/pull/20198#issuecomment-5580965639

   > PR seems to have a lot of unrelated changes. Lots of them can be re-used 
by methods currently in the codebase. Can do a re-check of them.
   > 
   > Unnecessary public APIs
   > 
   > * [QueryContext.of(...) and 
ofMap(...)](https://github.com/apache/druid/blob/dca26037c1b06ff59912dfcc5402a715cdea616e/processing/src/main/java/org/apache/druid/query/QueryContext.java#L100-L230):
 eight overloads covering one through four parameter/value pairs. Replace all 
with the builder.
   > * [Query.withOverriddenContext(parameter, 
value)](https://github.com/apache/druid/blob/dca26037c1b06ff59912dfcc5402a715cdea616e/processing/src/main/java/org/apache/druid/query/Query.java#L189-L202):
 no production caller; only new tests use it.
   > * Druids.TimeseriesQueryBuilder.context(parameter, value): no production 
caller and arbitrarily added only to the timeseries builder.
   > * QueryContexts.override(context, parameter, value): completely unused and 
conflicts with the other APIs’ null semantics.
   > * QueryContextParameter.set: production usage is only an edited embedded 
test.
   > * QueryContextParameter.parseOrDefault: used only by its own unit tests.
   > * QueryContext.has(parameter): only needed internally by get; it does not 
need to be public.
   > * QueryContextParameter.toString: used only by its test.
   > * longParameter and stringParameter: no descriptors use them.
   
   These public APIs are supported in this PR for further migrations PRs so 
that we don't introduce new public API and those new PRs can be done in 
parallel without conflict with each. The usage are demonstrated in : 
https://github.com/FrankChen021/druid/pull/190 and 
https://github.com/FrankChen021/druid/pull/191


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