public static Stream<Expression> extract(Expression expression) {
    return preOrder(expression).filter(Expression.class::isInstance).map(Expression.class::cast);
  }
Extracts and returns the stream of all expression subtrees within an Expression, including
Expression itself
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/SubExpressionExtractor.java