protected void validateStaticKvPair(ResolvedSchema resolvedSchema, Class keyClass, Class valueClass) {
        validateRowKey(resolvedSchema);
        List<Column> columns = resolvedSchema.getColumns();
        Preconditions.checkState(columns.size() % 2 == 1,
                "The number of elements must be odd, and all even elements are field.");
        for (int i = 1; i < columns.size(); i += 2) {
            Column offsetColumn = columns.get(i);
            Column valueColumn = columns.get(i + 1);
            Preconditions.checkState(offsetColumn.getDataType().getConversionClass() == keyClass,
                    "The type of key/offset field (odd column) must be " + keyClass.getName());
            Preconditions.checkState(valueColumn.getDataType().getConversionClass() == valueClass,
                    "The type of value field (even column) must be " + valueClass.getName());
        }
    }
The base class of {@link RedisSchema}

@param <T> The type of Flink state.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/redis/src/main/java/org/apache/inlong/sort/redis/common/schema/impl/AbstractRedisSchema.java