julianhyde commented on a change in pull request #1533: [CALCITE-3446] Make 
RelMetadataQuery extensible
URL: https://github.com/apache/calcite/pull/1533#discussion_r340363504
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/metadata/AbstractRelMetadataQuery.java
 ##########
 @@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.calcite.rel.metadata;
+
+import org.apache.calcite.rel.RelNode;
+
+import java.lang.reflect.Proxy;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Supplier;
+
+/**
+ * Base class for the RelMetadataQuery that uses the metadata handler class
 
 Review comment:
   The base class is not absolutely essential. But it separates the mechanism 
from the handler-specific stuff. The mechanism and handler-specific stuff are 
different kinds of code, and indication that they should be in different 
classes.
   
   It will make life better for the derived class because the class that has 
the built-in handlers isn't getting any special privileges.
   
   We should consider making the generated code use the base class.
   
   Does anyone think the base class should be an embedded object, not a base 
class? That's an option to consider.

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

Reply via email to