@Override
    protected Expression visitTrim(Trim node, Context<C> context) {
      if (!context.isDefaultRewrite()) {
        Expression result = rewriter.rewriteTrim(node, context.get(), ExpressionTreeRewriter.this);
        if (result != null) {
          return result;
        }
      }

      ImmutableList.Builder<Expression> expressions = ImmutableList.builder();
      expressions.add(node.getTrimSource());
      node.getTrimCharacter().ifPresent(expressions::add);

      Expression trimSource = rewrite(node.getTrimSource(), context.get());
      Optional<Expression> trimChar =
          node.getTrimCharacter().isPresent()
              ? Optional.of(rewrite(node.getTrimCharacter().get(), context.get()))
              : Optional.empty();

      if (trimSource != node.getTrimSource() || !sameElements(trimChar, node.getTrimCharacter())) {
        return trimChar
            .map(expression -> new Trim(node.getSpecification(), trimSource, expression))
            .orElseGet(() -> new Trim(node.getSpecification(), trimSource));
      }

      return node;
    }
Invoke the default rewrite logic explicitly. Specifically, it skips the invocation of the
expression rewriter for the provided node.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/ExpressionTreeRewriter.java