suneet-s commented on a change in pull request #9279: Guicify druid sql module
URL: https://github.com/apache/druid/pull/9279#discussion_r372535816
##########
File path: sql/src/main/java/org/apache/druid/sql/guice/SqlModule.java
##########
@@ -63,25 +55,21 @@ public void configure(Binder binder)
if (isEnabled()) {
Calcites.setSystemProperties();
- JsonConfigProvider.bind(binder, "druid.sql.planner",
PlannerConfig.class);
- JsonConfigProvider.bind(binder, "druid.sql.avatica",
AvaticaServerConfig.class);
- LifecycleModule.register(binder, DruidSchema.class);
binder.bind(ViewManager.class).to(NoopViewManager.class).in(LazySingleton.class);
- // Add empty SqlAggregator binder.
- Multibinder.newSetBinder(binder, SqlAggregator.class);
+ binder.install(new DruidCalciteSchemaModule());
Review comment:
I usually like smaller modules because it's easier to rationalize what needs
to be installed in that module. Every package has a module that describes how
implementations in it's package are provided to the rest of the code. The other
advantage of this is you can keep all the implementations package private and
only expose interfaces to other packages - which means there's less accidental
coupling between packages.
This also makes testing each module easier (I realize I haven't written
tests for them yet, but they're coming)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]