use of io.trino.FeaturesConfig in project trino by trinodb.
the class TestFilterInaccessibleColumns method init.
@BeforeClass
public void init() {
LocalQueryRunner runner = LocalQueryRunner.builder(SESSION).withFeaturesConfig(new FeaturesConfig().setHideInaccessibleColumns(true)).build();
runner.createCatalog(CATALOG, new TpchConnectorFactory(1), ImmutableMap.of());
assertions = new QueryAssertions(runner);
accessControl = assertions.getQueryRunner().getAccessControl();
}
use of io.trino.FeaturesConfig in project trino by trinodb.
the class TestFilterHideInacessibleColumnsSession method testEnableWhenAlreadyEnabledByDefault.
@Test
public void testEnableWhenAlreadyEnabledByDefault() {
FeaturesConfig featuresConfig = new FeaturesConfig();
featuresConfig.setHideInaccessibleColumns(true);
SessionPropertyManager sessionPropertyManager = createSessionPropertyManager(featuresConfig);
assertThatNoException().isThrownBy(() -> sessionPropertyManager.validateSystemSessionProperty(SystemSessionProperties.HIDE_INACCESSIBLE_COLUMNS, "true"));
}
use of io.trino.FeaturesConfig in project trino by trinodb.
the class TestFilterHideInacessibleColumnsSession method testDisableWhenEnabledByDefault.
@Test
public void testDisableWhenEnabledByDefault() {
FeaturesConfig featuresConfig = new FeaturesConfig();
featuresConfig.setHideInaccessibleColumns(true);
SessionPropertyManager sessionPropertyManager = createSessionPropertyManager(featuresConfig);
assertThatThrownBy(() -> sessionPropertyManager.validateSystemSessionProperty(SystemSessionProperties.HIDE_INACCESSIBLE_COLUMNS, "false")).hasMessage("hide_inaccessible_columns cannot be disabled with session property when it was enabled with configuration");
}
use of io.trino.FeaturesConfig in project trino by trinodb.
the class TestFilterHideInacessibleColumnsSession method testDisableWhenAlreadyDisabledByDefault.
@Test
public void testDisableWhenAlreadyDisabledByDefault() {
FeaturesConfig featuresConfig = new FeaturesConfig();
SessionPropertyManager sessionPropertyManager = createSessionPropertyManager(featuresConfig);
assertThatNoException().isThrownBy(() -> sessionPropertyManager.validateSystemSessionProperty(SystemSessionProperties.HIDE_INACCESSIBLE_COLUMNS, "false"));
}
use of io.trino.FeaturesConfig in project trino by trinodb.
the class TestMergeOperator method setUp.
@BeforeMethod
public void setUp() {
executor = newSingleThreadScheduledExecutor(daemonThreadsNamed("test-merge-operator-%s"));
serdeFactory = new TestingPagesSerdeFactory();
taskBuffers = buildNonEvictableCache(CacheBuilder.newBuilder(), CacheLoader.from(TestingTaskBuffer::new));
httpClient = new TestingHttpClient(new TestingExchangeHttpClientHandler(taskBuffers), executor);
exchangeClientFactory = new DirectExchangeClientFactory(new NodeInfo("test"), new FeaturesConfig(), new DirectExchangeClientConfig(), httpClient, executor, new ExchangeManagerRegistry(new ExchangeHandleResolver()));
orderingCompiler = new OrderingCompiler(new TypeOperators());
}
Aggregations