protected MeasurementPath getCurrentMeasurementPathInTraverse(IMeasurementMNode<N> currentNode) {
    N par = getParentOfNextMatchedNode();
    MeasurementPath retPath =
        new MeasurementPath(
            getPartialPathFromRootToNode(currentNode.getAsMNode()), currentNode.getSchema());
    retPath.setUnderAlignedEntity(par.getAsDeviceMNode().isAlignedNullable());
    return retPath;
  }
When traverse goes into a template, IMNode.getPartialPath may not work as nodes in template has
no parent on MTree. So this methods will construct a path from root to node in template using a
stack traverseContext.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/traverser/collector/MeasurementCollector.java