@Override
  public Optional<Statement> visitCreateLogicalView(
      final CreateLogicalViewStatement createLogicalViewStatement, final IoTDBTreePattern pattern) {
    final int[] filteredIndexes =
        IntStream.range(0, createLogicalViewStatement.getTargetPathList().size())
            .filter(
                index ->
                    pattern.matchesMeasurement(
                        createLogicalViewStatement
                            .getTargetPathList()
                            .get(index)
                            .getIDeviceIDAsFullDevice(),
                        createLogicalViewStatement.getTargetPathList().get(index).getMeasurement()))
            .toArray();
    if (filteredIndexes.length == 0) {
      return Optional.empty();
    }
    createLogicalViewStatement.setTargetFullPaths(
        IoTDBTreePattern.applyIndexesOnList(
            filteredIndexes, createLogicalViewStatement.getTargetPathList()));
    createLogicalViewStatement.setViewExpressions(
        IoTDBTreePattern.applyIndexesOnList(
            filteredIndexes, createLogicalViewStatement.getViewExpressions()));

    return Optional.of(createLogicalViewStatement);
  }
The {@link PipeStatementTreePatternParseVisitor} will transform the schema {@link Statement}s
using {@link IoTDBTreePattern}. Rule:

<p>1. All patterns in the output {@link Statement} will be the intersection of the original
{@link Statement}'s patterns and the given {@link IoTDBTreePattern}.

<p>2. If a pattern does not intersect with the {@link IoTDBTreePattern}, it's dropped.

<p>3. If all the patterns in the {@link Statement} is dropped, the {@link Statement} is dropped.

<p>4. The output {@link Statement} can be the altered form of the original one because it's read
from the {@link SRStatementGenerator} and will no longer be used.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipeStatementTreePatternParseVisitor.java