Cpaulyz commented on code in PR #9243:
URL: https://github.com/apache/iotdb/pull/9243#discussion_r1134923242
##########
server/src/main/java/org/apache/iotdb/db/metadata/mtree/traverser/Traverser.java:
##########
@@ -49,17 +50,18 @@
* <li>collector: to collect customized results of the matched node or
measurement
* </ol>
*/
-public abstract class Traverser<R> extends AbstractTreeVisitor<IMNode, R> {
+public abstract class Traverser<R, N extends IMNode<N>> extends
AbstractTreeVisitor<N, R> {
private static final Logger logger =
LoggerFactory.getLogger(Traverser.class);
- protected IMTreeStore store;
+ protected IMTreeStore<N> store;
- protected IMNode startNode;
+ protected N startNode;
protected String[] nodes;
// measurement in template should be processed only if templateMap is not
null
protected Map<Integer, Template> templateMap;
+ protected IMNodeFactory<N> nodeFactory;
Review Comment:
I think it's ok to put all the getChild logic in a base class. It will also
make it easier to read.
--
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]