JackieTien97 commented on code in PR #7270:
URL: https://github.com/apache/iotdb/pull/7270#discussion_r972584037
##########
node-commons/src/main/java/org/apache/iotdb/commons/path/PathPatternNode.java:
##########
@@ -26,46 +26,96 @@
import java.io.DataOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.Set;
+import java.util.function.BiConsumer;
+import java.util.function.Supplier;
-public class PathPatternNode {
+import static
org.apache.iotdb.commons.conf.IoTDBConstant.MULTI_LEVEL_PATH_WILDCARD;
+import static
org.apache.iotdb.commons.conf.IoTDBConstant.ONE_LEVEL_PATH_WILDCARD;
+
+public class PathPatternNode<V> {
private final String name;
- private final Map<String, PathPatternNode> children;
+ private final Map<String, PathPatternNode<V>> children;
+ private Set<V> valueSet;
Review Comment:
I think it's better to do the serialization in PathPatternNode, because
`PatternTreeMap` also need to be serialized and tranferred by rpc.
It's fine to occupy four more bytes(int size) for one node to indicate the
valueSet's size, one packet in network will be like 1KB or something else, four
more bytes per node will not hurt the perfermance.
--
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]