paul-rogers opened a new pull request, #13788:
URL: https://github.com/apache/druid/pull/13788

   The Druid catalog project introduces a `CatalogResolver` interface to 
resolve catalog entries. This PR adds the interface, and wires it up to the SQL 
planner stack, but does not provide the "live" implementation: that will come 
in a subsequent PR. This PR provides only the dummy "null" implementation. Nor 
does this PR change the Calcite planner to use the resolver: that will also 
come later. This PR simply pulls out a bunch of refactoring to make it easier 
to review.
   
   This interface is configured via Guice and passed to the planner factory. 
The planner factory constructor has grown to take a large number of objects. As 
it turns out, the objects form two groups: those that are globals and provided 
via Guice, and those that can vary per-query, especially in unit tests. To 
reflect this, the `PlannerFactory` is split, with a new `PlannerToolbox` 
providing the fixed, global objects. `PlannerFactory` extends `PlannerToolbox` 
to add the per-query items.
   
   The `PlannerContext` duplicated many methods of `PlannerFactory` and simply 
passed along the same values. Most of those were the fixed values. The code is 
refactored so that `PlannerContext` holds an instance of `PlannerToolbox`, and 
code that needs the global items gets them from the `PlannerToolbox` instead.
   
   Since we're doing refactoring, this is a good time to add the `PlannerHook` 
to the planner context so it is available to capture the "physical plan" in a 
later PR.
   
   Everywhere we create an instance of `PlannerFactory`, we now have to pass in 
an instance of the `CatalogResolver`. As a result, a large number of test files 
had to make this trivial change.
   
   #### Release note
   
   This PR introduces no user-visible changes.
   
   <hr>
   
   This PR has:
   
   - [X] been self-reviewed.
   - [X] a release note entry in the PR description.
   - [X] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [X] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [X] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   


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