MCPcopy Create free account
hub / github.com/apache/paimon-trino / TrinoModule

Class TrinoModule

src/main/java/org/apache/paimon/trino/TrinoModule.java:38–62  ·  view source on GitHub ↗

Module for binding instance.

Source from the content-addressed store, hash-verified

36
37/** Module for binding instance. */
38public class TrinoModule implements Module {
39 private Map<String, String> config;
40
41 public TrinoModule(Map<String, String> config) {
42 this.config = config;
43 }
44
45 @Override
46 public void configure(Binder binder) {
47 binder.bind(Options.class).toInstance(new Options(config));
48 binder.bind(TrinoMetadataFactory.class).in(SINGLETON);
49 binder.bind(TrinoSplitManager.class).in(SINGLETON);
50 binder.bind(TrinoPageSourceProvider.class).in(SINGLETON);
51 binder.bind(TrinoPageSinkProvider.class).in(SINGLETON);
52 binder.bind(TrinoNodePartitioningProvider.class).in(SINGLETON);
53 binder.bind(TrinoSessionProperties.class).in(SINGLETON);
54 binder.bind(TrinoTableOptions.class).in(SINGLETON);
55 newSetBinder(binder, ConnectorTableFunction.class)
56 .addBinding()
57 .toProvider(TableChangesFunctionProvider.class)
58 .in(Scopes.SINGLETON);
59 binder.bind(FunctionProvider.class).to(TrinoFunctionProvider.class).in(Scopes.SINGLETON);
60 binder.bind(TableChangesFunctionProcessorProvider.class).in(SINGLETON);
61 }
62}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected