Caideyipi commented on code in PR #16961:
URL: https://github.com/apache/iotdb/pull/16961#discussion_r2650395355
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java:
##########
@@ -1109,15 +1109,13 @@ public void deserialize(final InputStream inputStream)
throws IOException {
name = tableNode.getName();
stack.push(new Pair<>(tableNode, false));
} else {
- // Currently internal mNode will not be the leaf node and thus will not
be deserialized here
- // This is just in case
internalMNode = deserializeInternalMNode(inputStream);
ReadWriteIOUtils.readInt(inputStream);
name = internalMNode.getName();
stack.push(new Pair<>(internalMNode, false));
}
- while (!PATH_ROOT.equals(name)) {
+ while (!PATH_ROOT.equals(name) || type != INTERNAL_MNODE_TYPE) {
Review Comment:
The stack size cannot reflect whether the "root" is an internal node....
"root.a.root.b.sg" will cause the stack to be (sg, b, root, a, root), and the
stack size always == 1. Besides, a pattern like this will not pass the partial
path AST check.
--
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]