Search in sources :

Example 1 with UnsupportedFunctionCallRewriterForUt

use of io.prestosql.sql.builder.functioncall.base.UnsupportedFunctionCallRewriterForUt in project hetu-core by openlookeng.

the class TestFunctionWriterManagerGroup method setUp.

@BeforeTest
public void setUp() {
    String connectorName = "jdbc_connector";
    String versionName = "default";
    Map<String, FunctionCallRewriter> functionCallRewriterMap = new HashMap<>();
    functionCallRewriterMap.put(VarbinaryLiteralFunctionCallRewriterForUt.INNER_FUNC_VARBINARY_LITERAL, new VarbinaryLiteralFunctionCallRewriterForUt());
    functionCallRewriterMap.put(UnsupportedFunctionCallRewriterForUt.UNSUPPORTED_FUNCTION_NAME_TEST, new UnsupportedFunctionCallRewriterForUt(connectorName));
    DefaultUdfRewriteConfigSupplier defaultUdfRewriteConfigSupplier = new DefaultUdfRewriteConfigSupplier(Test_UDF_REWRITE_PATTERNS);
    DefaultConnectorConfigFunctionRewriter defaultConnectorConfigFunctionRewriter = new DefaultConnectorConfigFunctionRewriter(connectorName, defaultUdfRewriteConfigSupplier);
    setFunctionWriterManager(connectorName, versionName, functionCallRewriterMap, defaultConnectorConfigFunctionRewriter);
    FunctionWriterManager functionWriterManager2 = FunctionWriterManagerGroup.newFunctionWriterManagerInstance(connectorName, versionName, functionCallRewriterMap, defaultConnectorConfigFunctionRewriter);
    assertEquals(functionWriterManager1.toString(), functionWriterManager2.toString());
}
Also used : FunctionCallRewriter(io.prestosql.sql.builder.functioncall.functions.FunctionCallRewriter) HashMap(java.util.HashMap) UnsupportedFunctionCallRewriterForUt(io.prestosql.sql.builder.functioncall.base.UnsupportedFunctionCallRewriterForUt) DefaultConnectorConfigFunctionRewriter(io.prestosql.sql.builder.functioncall.functions.config.DefaultConnectorConfigFunctionRewriter) DefaultUdfRewriteConfigSupplier(io.prestosql.configmanager.DefaultUdfRewriteConfigSupplier) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

DefaultUdfRewriteConfigSupplier (io.prestosql.configmanager.DefaultUdfRewriteConfigSupplier)1 UnsupportedFunctionCallRewriterForUt (io.prestosql.sql.builder.functioncall.base.UnsupportedFunctionCallRewriterForUt)1 FunctionCallRewriter (io.prestosql.sql.builder.functioncall.functions.FunctionCallRewriter)1 DefaultConnectorConfigFunctionRewriter (io.prestosql.sql.builder.functioncall.functions.config.DefaultConnectorConfigFunctionRewriter)1 HashMap (java.util.HashMap)1 BeforeTest (org.testng.annotations.BeforeTest)1