public static boolean isFieldFromScope(FieldId field, Scope scope) {
    return Objects.equals(field.getRelationId(), scope.getRelationId());
  }
Extract expressions that are references to a given scope.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ScopeReferenceExtractor.java