Search in sources :

Example 1 with ProcedureRegistry

use of io.prestosql.metadata.ProcedureRegistry in project hetu-core by openlookeng.

the class TestProcedureCall method setUp.

@BeforeClass
public void setUp() {
    TestingPrestoServer coordinator = ((DistributedQueryRunner) getQueryRunner()).getCoordinator();
    tester = coordinator.getProcedureTester();
    // register procedures in the bogus testing catalog
    ProcedureRegistry procedureRegistry = coordinator.getMetadata().getProcedureRegistry();
    TestingProcedures procedures = new TestingProcedures(coordinator.getProcedureTester());
    procedureRegistry.addProcedures(new CatalogName(TESTING_CATALOG), procedures.getProcedures(PROCEDURE_SCHEMA));
    session = testSessionBuilder().setCatalog(TESTING_CATALOG).setSchema(PROCEDURE_SCHEMA).build();
}
Also used : TestingPrestoServer(io.prestosql.server.testing.TestingPrestoServer) ProcedureRegistry(io.prestosql.metadata.ProcedureRegistry) CatalogName(io.prestosql.spi.connector.CatalogName) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

ProcedureRegistry (io.prestosql.metadata.ProcedureRegistry)1 TestingPrestoServer (io.prestosql.server.testing.TestingPrestoServer)1 CatalogName (io.prestosql.spi.connector.CatalogName)1 BeforeClass (org.testng.annotations.BeforeClass)1