Search in sources :

Example 1 with MapColumnValidator

use of com.facebook.presto.verifier.checksum.MapColumnValidator in project presto by prestodb.

the class VerifierTestUtil method createChecksumValidator.

public static ChecksumValidator createChecksumValidator(VerifierConfig verifierConfig) {
    Map<Column.Category, Provider<ColumnValidator>> lazyValidators = new HashMap<>();
    Map<Column.Category, Provider<ColumnValidator>> validators = ImmutableMap.of(Column.Category.SIMPLE, SimpleColumnValidator::new, Column.Category.FLOATING_POINT, () -> new FloatingPointColumnValidator(verifierConfig), Column.Category.ARRAY, ArrayColumnValidator::new, Column.Category.ROW, () -> new RowColumnValidator(lazyValidators), Column.Category.MAP, MapColumnValidator::new);
    lazyValidators.putAll(validators);
    return new ChecksumValidator(validators);
}
Also used : HashMap(java.util.HashMap) ArrayColumnValidator(com.facebook.presto.verifier.checksum.ArrayColumnValidator) MapColumnValidator(com.facebook.presto.verifier.checksum.MapColumnValidator) ChecksumValidator(com.facebook.presto.verifier.checksum.ChecksumValidator) FloatingPointColumnValidator(com.facebook.presto.verifier.checksum.FloatingPointColumnValidator) RowColumnValidator(com.facebook.presto.verifier.checksum.RowColumnValidator) SimpleColumnValidator(com.facebook.presto.verifier.checksum.SimpleColumnValidator) Provider(javax.inject.Provider)

Aggregations

ArrayColumnValidator (com.facebook.presto.verifier.checksum.ArrayColumnValidator)1 ChecksumValidator (com.facebook.presto.verifier.checksum.ChecksumValidator)1 FloatingPointColumnValidator (com.facebook.presto.verifier.checksum.FloatingPointColumnValidator)1 MapColumnValidator (com.facebook.presto.verifier.checksum.MapColumnValidator)1 RowColumnValidator (com.facebook.presto.verifier.checksum.RowColumnValidator)1 SimpleColumnValidator (com.facebook.presto.verifier.checksum.SimpleColumnValidator)1 HashMap (java.util.HashMap)1 Provider (javax.inject.Provider)1