@Override
  public void serializeUseTemplate(DataOutputStream stream, TypeProvider typeProvider)
      throws IOException {
    PlanNodeType.FILTER.serialize(stream);
    id.serialize(stream);
    ReadWriteIOUtils.write(fromWhere, stream);
    // for FilterNode generated by having clause, it must be serialized totally
    if (!fromWhere) {
      ReadWriteIOUtils.write(outputExpressions.length, stream);
      for (Expression expression : outputExpressions) {
        Expression.serialize(expression, stream);
      }
      Expression.serialize(predicate, stream);
      ReadWriteIOUtils.write(keepNull, stream);
      ReadWriteIOUtils.write(scanOrder.ordinal(), stream);
    }
    ReadWriteIOUtils.write(getChildren().size(), stream);
    for (PlanNode planNode : getChildren()) {
      planNode.serializeUseTemplate(stream, typeProvider);
    }
  }
This construction method is only used in inner of class `FilterNode`.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/FilterNode.java