You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/03/31 02:32:15 UTC

[GitHub] [iotdb] MarcosZyk commented on a change in pull request #5383: Implement SchemaTree Search

MarcosZyk commented on a change in pull request #5383:
URL: https://github.com/apache/iotdb/pull/5383#discussion_r839118256



##########
File path: server/src/main/java/org/apache/iotdb/db/mpp/common/schematree/SchemaNode.java
##########
@@ -19,7 +19,49 @@
 
 package org.apache.iotdb.db.mpp.common.schematree;
 
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+
 public abstract class SchemaNode {
 
-  private String name;
+  protected final String name;
+
+  public SchemaNode(String name) {
+    this.name = name;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public SchemaNode getChild(String name) {
+    return null;
+  }
+
+  public void addChild(String name, SchemaNode child) {}
+
+  public Map<String, SchemaNode> getChildren() {
+    return Collections.emptyMap();
+  }
+
+  public Iterator<SchemaNode> getChildrenIterator() {
+    return Collections.emptyIterator();
+  }
+
+  public boolean isEntity() {
+    return false;
+  }
+
+  public boolean isMeasurement() {
+    return false;
+  }
+
+  public SchemaEntityNode getAsEntityNode() {
+    throw new ClassCastException("This not isn't instance of SchemaEntityNode.");

Review comment:
       Fixed.




-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org