addType(BOOLEAN); addType(BIGINT); addType(INTEGER); addType(SMALLINT); addType(TINYINT); addType(DOUBLE); addType(REAL); addType(VARBINARY); addType(DATE); addType(TIME); addType(TIME_WITH_TIME_ZONE); addType(TIMESTAMP); addType(TIMESTAMP_WITH_TIME_ZONE); addType(INTERVAL_YEAR_MONTH); addType(INTERVAL_DAY_TIME); addType(HYPER_LOG_LOG); addType(SET_DIGEST); addType(P4_HYPER_LOG_LOG); addType(JONI_REGEXP); addType(RE2J_REGEXP); addType(LIKE_PATTERN); addType(JSON_PATH); addType(COLOR); addType(JSON); addType(CODE_POINTS); addType(IPADDRESS); addParametricType(VarcharParametricType.VARCHAR); addParametricType(CharParametricType.CHAR);
protected void registerTypes(Plugin plugin) { for (Type type : plugin.getTypes()) { typeRegistry.addType(type); } }
protected void registerTypes(Plugin plugin) { for (Type type : plugin.getTypes()) { functionAssertions.getTypeRegistry().addType(type); } }
@BeforeClass protected void registerFunctions() { GeoPlugin plugin = new GeoPlugin(); for (Type type : plugin.getTypes()) { functionAssertions.getTypeRegistry().addType(type); } functionAssertions.getMetadata().addFunctions(extractFunctions(plugin.getFunctions())); }
@BeforeClass protected void registerFunctions() { GeoPlugin plugin = new GeoPlugin(); for (Type type : plugin.getTypes()) { functionAssertions.getTypeRegistry().addType(type); } functionAssertions.getMetadata().addFunctions(extractFunctions(plugin.getFunctions())); functionAssertions.getMetadata().addFunctions(ImmutableList.of(APPLY_FUNCTION)); }
@BeforeClass public void registerFunctions() { GeoPlugin plugin = new GeoPlugin(); for (Type type : plugin.getTypes()) { functionAssertions.getTypeRegistry().addType(type); } functionAssertions.getMetadata().addFunctions(extractFunctions(plugin.getFunctions())); function = functionAssertions .getMetadata() .getFunctionRegistry() .getAggregateFunctionImplementation(new Signature( getFunctionName(), FunctionKind.AGGREGATE, parseTypeSignature(GeometryType.GEOMETRY_TYPE_NAME), parseTypeSignature(GeometryType.GEOMETRY_TYPE_NAME))); }
private static LocalQueryRunner createLocalQueryRunner() { Session defaultSession = testSessionBuilder() .setCatalog("local") .setSchema(TINY_SCHEMA_NAME) .build(); LocalQueryRunner localQueryRunner = new LocalQueryRunner(defaultSession); // add the tpch catalog // local queries run directly against the generator localQueryRunner.createCatalog( defaultSession.getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.of()); MLPlugin plugin = new MLPlugin(); for (Type type : plugin.getTypes()) { localQueryRunner.getTypeManager().addType(type); } for (ParametricType parametricType : plugin.getParametricTypes()) { localQueryRunner.getTypeManager().addParametricType(parametricType); } localQueryRunner.getMetadata().addFunctions(extractFunctions(new MLPlugin().getFunctions())); return localQueryRunner; } }
typeRegistry.addType(type);
addType(BOOLEAN); addType(BIGINT); addType(DOUBLE); addType(VARBINARY); addType(DATE); addType(TIME); addType(TIME_WITH_TIME_ZONE); addType(TIMESTAMP); addType(TIMESTAMP_WITH_TIME_ZONE); addType(INTERVAL_YEAR_MONTH); addType(INTERVAL_DAY_TIME); addType(HYPER_LOG_LOG); addType(P4_HYPER_LOG_LOG); addType(REGEXP); addType(LIKE_PATTERN); addType(JSON_PATH); addType(COLOR); addType(JSON); addParametricType(VarcharParametricType.VARCHAR); addParametricType(ROW); addType(type);
@BeforeClass public void setup() { ((TypeRegistry) METADATA.getTypeManager()).addType(CustomDoubleType.CUSTOM_DOUBLE); }
@BeforeClass protected void registerFunctions() { GeoPlugin plugin = new GeoPlugin(); for (Type type : plugin.getTypes()) { functionAssertions.getTypeRegistry().addType(type); } functionAssertions.getMetadata().addFunctions(extractFunctions(plugin.getFunctions())); functionAssertions.getMetadata().addFunctions(ImmutableList.of(APPLY_FUNCTION)); }
typeRegistry.addType(type);
@BeforeClass public void registerFunctions() { GeoPlugin plugin = new GeoPlugin(); for (Type type : plugin.getTypes()) { functionAssertions.getTypeRegistry().addType(type); } functionAssertions.getMetadata().addFunctions(extractFunctions(plugin.getFunctions())); function = functionAssertions .getMetadata() .getFunctionRegistry() .getAggregateFunctionImplementation(new Signature( getFunctionName(), FunctionKind.AGGREGATE, parseTypeSignature(GeometryType.GEOMETRY_TYPE_NAME), parseTypeSignature(GeometryType.GEOMETRY_TYPE_NAME))); }