use of com.facebook.presto.verifier.checksum.ColumnValidator in project presto by prestodb.
the class VerifierModule method setup.
protected final void setup(Binder binder) {
configBinder(binder).bindConfig(VerifierConfig.class);
configBinder(binder).bindConfig(DeterminismAnalyzerConfig.class);
configBinder(binder).bindConfig(QueryConfigurationOverridesConfig.class, ForControl.class, "control");
configBinder(binder).bindConfig(QueryConfigurationOverridesConfig.class, ForTest.class, "test");
binder.bind(QueryConfigurationOverrides.class).annotatedWith(ForControl.class).to(Key.get(QueryConfigurationOverridesConfig.class, ForControl.class)).in(SINGLETON);
binder.bind(QueryConfigurationOverrides.class).annotatedWith(ForTest.class).to(Key.get(QueryConfigurationOverridesConfig.class, ForTest.class)).in(SINGLETON);
for (Class<? extends Predicate<SourceQuery>> customQueryFilterClass : customQueryFilterClasses) {
binder.bind(customQueryFilterClass).in(SINGLETON);
}
// block encoding
binder.bind(BlockEncodingSerde.class).to(BlockEncodingManager.class).in(Scopes.SINGLETON);
newSetBinder(binder, BlockEncoding.class);
// catalog
binder.bind(CatalogManager.class).in(Scopes.SINGLETON);
// function
binder.bind(FunctionAndTypeManager.class).in(SINGLETON);
// handle resolver
binder.install(new HandleJsonModule());
// parser
binder.bind(SqlParserOptions.class).toInstance(sqlParserOptions);
binder.bind(SqlParser.class).in(SINGLETON);
// transaction
configBinder(binder).bindConfig(TransactionManagerConfig.class);
// type
configBinder(binder).bindConfig(FeaturesConfig.class);
binder.bind(TypeManager.class).to(FunctionAndTypeManager.class).in(SINGLETON);
newSetBinder(binder, Type.class);
// verifier
install(new VerificationQueryRewriterModule());
install(FailureResolverModule.BUILT_IN);
binder.bind(VerificationManager.class).in(SINGLETON);
binder.bind(VerificationFactory.class).in(SINGLETON);
binder.bind(ChecksumValidator.class).in(SINGLETON);
MapBinder<Category, ColumnValidator> columnValidatorBinder = MapBinder.newMapBinder(binder, Category.class, ColumnValidator.class);
columnValidatorBinder.addBinding(SIMPLE).to(SimpleColumnValidator.class).in(SINGLETON);
columnValidatorBinder.addBinding(FLOATING_POINT).to(FloatingPointColumnValidator.class).in(SINGLETON);
columnValidatorBinder.addBinding(ARRAY).to(ArrayColumnValidator.class).in(SINGLETON);
columnValidatorBinder.addBinding(ROW).to(RowColumnValidator.class).in(SINGLETON);
columnValidatorBinder.addBinding(MAP).to(MapColumnValidator.class).in(SINGLETON);
binder.bind(new TypeLiteral<List<Predicate<SourceQuery>>>() {
}).toProvider(new CustomQueryFilterProvider(customQueryFilterClasses));
}
Aggregations