Search in sources :

Example 6 with WarningCollectorConfig

use of com.facebook.presto.execution.warnings.WarningCollectorConfig in project presto by prestodb.

the class AbstractAnalyzerTest method analyzeWithWarnings.

protected WarningCollector analyzeWithWarnings(@Language("SQL") String query) {
    WarningCollector warningCollector = new TestingWarningCollector(new WarningCollectorConfig(), new TestingWarningCollectorConfig());
    analyze(CLIENT_SESSION, warningCollector, query);
    return warningCollector;
}
Also used : TestingWarningCollectorConfig(com.facebook.presto.testing.TestingWarningCollectorConfig) WarningCollectorConfig(com.facebook.presto.execution.warnings.WarningCollectorConfig) TestingWarningCollectorConfig(com.facebook.presto.testing.TestingWarningCollectorConfig) TestingWarningCollector(com.facebook.presto.testing.TestingWarningCollector) WarningCollector(com.facebook.presto.spi.WarningCollector) TestingWarningCollector(com.facebook.presto.testing.TestingWarningCollector)

Example 7 with WarningCollectorConfig

use of com.facebook.presto.execution.warnings.WarningCollectorConfig in project presto by prestodb.

the class TestCompletedEventWarnings method testCompletedEventWarnings.

@Test
public void testCompletedEventWarnings() throws InterruptedException {
    TestingWarningCollectorConfig warningCollectorConfig = new TestingWarningCollectorConfig().setPreloadedWarnings(TEST_WARNINGS);
    TestingWarningCollector testingWarningCollector = new TestingWarningCollector(new WarningCollectorConfig(), warningCollectorConfig);
    assertWarnings("select 1", ImmutableMap.of(), testingWarningCollector.getWarnings().stream().map(PrestoWarning::getWarningCode).collect(toImmutableList()));
}
Also used : TestingWarningCollectorConfig(com.facebook.presto.testing.TestingWarningCollectorConfig) WarningCollectorConfig(com.facebook.presto.execution.warnings.WarningCollectorConfig) TestingWarningCollectorConfig(com.facebook.presto.testing.TestingWarningCollectorConfig) PrestoWarning(com.facebook.presto.spi.PrestoWarning) TestingWarningCollector(com.facebook.presto.testing.TestingWarningCollector) Test(org.testng.annotations.Test)

Aggregations

WarningCollectorConfig (com.facebook.presto.execution.warnings.WarningCollectorConfig)7 Test (org.testng.annotations.Test)5 TestingWarningCollector (com.facebook.presto.testing.TestingWarningCollector)4 TestingWarningCollectorConfig (com.facebook.presto.testing.TestingWarningCollectorConfig)4 Session (com.facebook.presto.Session)3 PrestoWarning (com.facebook.presto.spi.PrestoWarning)3 SystemSessionProperties (com.facebook.presto.SystemSessionProperties)2 QueryManagerConfig (com.facebook.presto.execution.QueryManagerConfig)2 TaskManagerConfig (com.facebook.presto.execution.TaskManagerConfig)2 NodeSchedulerConfig (com.facebook.presto.execution.scheduler.NodeSchedulerConfig)2 MemoryManagerConfig (com.facebook.presto.memory.MemoryManagerConfig)2 NodeMemoryConfig (com.facebook.presto.memory.NodeMemoryConfig)2 SessionPropertyManager (com.facebook.presto.metadata.SessionPropertyManager)2 WarningCollector (com.facebook.presto.spi.WarningCollector)2 NodeSpillConfig (com.facebook.presto.spiller.NodeSpillConfig)2 TracingConfig (com.facebook.presto.tracing.TracingConfig)2 DefaultWarningCollector (com.facebook.presto.execution.warnings.DefaultWarningCollector)1 WarningCode (com.facebook.presto.spi.WarningCode)1 SemanticException (com.facebook.presto.sql.analyzer.SemanticException)1 ResultSet (java.sql.ResultSet)1