private SchemaFilter wrapIdOrAttributeFilter(
      final SchemaFilter filter, final String columnName, final Context context) {
    return context
            .table
            .getColumnSchema(columnName)
            .getColumnCategory()
            .equals(TsTableColumnCategory.TAG)
        ? new TagFilter(filter, context.idColumnIndexMap.get(columnName))
        : new AttributeFilter(filter, columnName);
  }
The {@link ConvertSchemaPredicateToFilterVisitor} will convert a predicate to {@link
SchemaFilter}. For the predicates which can not be converted, this will return {@code null}.
However, for IdDeterminedPredicate, this visitor shall never return {@code null}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/schema/ConvertSchemaPredicateToFilterVisitor.java