private Optional<IDeviceID.TreeDeviceIdColumnValueExtractor>
      createTreeDeviceIdColumnValueExtractor(DeviceTableScanNode node) {
    if (node instanceof TreeDeviceViewScanNode
        || node instanceof AggregationTreeDeviceViewScanNode) {
      QualifiedObjectName qualifiedObjectName = node.getQualifiedObjectName();
      TsTable table =
          DataNodeTableCache.getInstance()
              .getTable(qualifiedObjectName.getDatabaseName(), qualifiedObjectName.getObjectName());
      return Optional.of(
          TableOperatorGenerator.createTreeDeviceIdColumnValueExtractor(
              DataNodeTreeViewSchemaUtils.getPrefixPath(table)));
    } else {
      return Optional.empty();
    }
  }
This class is used to generate distributed plan for table model.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java