@Override
  public Optional<Statement> visitActivateTemplate(
      final ActivateTemplateStatement activateTemplateStatement, final IoTDBTreePattern pattern) {
    return pattern.matchDevice(activateTemplateStatement.getPath().getFullPath())
        ? Optional.of(activateTemplateStatement)
        : Optional.empty();
  }
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