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;
}
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()));
}
Aggregations