paul-rogers opened a new pull request, #13426: URL: https://github.com/apache/druid/pull/13426
This PR pulls out of PR #13360 the revisions to the planner test framework. This PR continues the effort to enhance the Calcite test framework. * `SqlTestFramework` moves another step closer to being driven by Guice. A new method, `configureGuice()` allows using Druid modules to bring in dependencies. This method replaces a large amount of ad-hoc code that previously existed in Calcite tests. * `SqlTestFramework` also adds an `applyProperties(.)` method to let tests set up properly values to be used in tests. The method is put to work in several aggregate tests to select the aggregator to use for `COUNT DISTINCT`. The result replaces additional ad-hoc code. * Several previous `SqlTestFramework` methods are removed in favor of the above. * A new `PlannerCaptureHook`, patterned after Calcite's `QueryHook` class, captures information from the Druid planner for use in test verification. * The `QueryTestBuilder` and runner provide a way to compare the Calcite logical plan against an expected value. The plan is captured using the hook above. * Similarly, we can validate the SQL row schema against an expected schema. (The framework already has a way to compare the Druid row signature, using Druid types. This new form allows using SQL types.) * Retires some of the test-specific query component creation * Fixes query log hook race condition <hr> This PR has: - [X] been self-reviewed. - [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]
