mchades commented on code in PR #4196:
URL: https://github.com/apache/gravitino/pull/4196#discussion_r1683722209
##########
core/src/main/java/org/apache/gravitino/catalog/SchemaNormalizeDispatcher.java:
##########
@@ -33,26 +35,27 @@
import org.apache.gravitino.exceptions.SchemaAlreadyExistsException;
public class SchemaNormalizeDispatcher implements SchemaDispatcher {
+ private final CatalogManager catalogManager;
+ private final SchemaDispatcher dispatcher;
- private final SchemaOperationDispatcher dispatcher;
-
- public SchemaNormalizeDispatcher(SchemaOperationDispatcher dispatcher) {
+ public SchemaNormalizeDispatcher(SchemaDispatcher dispatcher, CatalogManager
catalogManager) {
Review Comment:
The key to refactoring is here, replacing `SchemaOperationDispatcher` with
`SchemaDispatcher`.
In the decorator design pattern, we should depend on interface
`SchemaDispatcher` instead of the concrete implementation class
`SchemaOperationDispatcher`.
@jerryshao
--
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]