use of org.apache.flink.table.module.CoreModule in project flink by apache.
the class CoreModuleFactoryTest method test.
@Test
public void test() {
final CoreModule expectedModule = CoreModule.INSTANCE;
final Module actualModule = FactoryUtil.createModule(CoreModuleFactory.IDENTIFIER, Collections.emptyMap(), new Configuration(), Thread.currentThread().getContextClassLoader());
assertEquals(expectedModule, actualModule);
}
use of org.apache.flink.table.module.CoreModule in project flink by apache.
the class HiveDialectQueryITCase method getTableEnvWithHiveCatalog.
private static TableEnvironment getTableEnvWithHiveCatalog() {
TableEnvironment tableEnv = HiveTestUtils.createTableEnvInBatchMode(SqlDialect.HIVE);
tableEnv.registerCatalog(hiveCatalog.getName(), hiveCatalog);
tableEnv.useCatalog(hiveCatalog.getName());
// automatically load hive module in hive-compatible mode
HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion());
CoreModule coreModule = CoreModule.INSTANCE;
for (String loaded : tableEnv.listModules()) {
tableEnv.unloadModule(loaded);
}
tableEnv.loadModule("hive", hiveModule);
tableEnv.loadModule("core", coreModule);
return tableEnv;
}
Aggregations