Skip to content

Commit

Permalink
Ensure HiveConfig is not bound in Delta Lake
Browse files Browse the repository at this point in the history
Delta does not honor configuration provided by `HiveConfig`, ensure it's
not accepted in the config.
  • Loading branch information
findepi committed Oct 11, 2022
1 parent 2496fac commit 9919c35
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import com.google.common.collect.ImmutableMap;
import io.airlift.bootstrap.ApplicationConfigurationException;
import io.trino.plugin.hive.HiveConfig;
import io.trino.spi.Plugin;
import io.trino.spi.connector.Connector;
import io.trino.spi.connector.ConnectorFactory;
Expand Down Expand Up @@ -142,6 +143,19 @@ public void testNoActiveDataFilesCaching()
new TestingConnectorContext());
}

@Test
public void testHiveConfigIsNotBound()
{
ConnectorFactory factory = getOnlyElement(new DeltaLakePlugin().getConnectorFactories());
assertThatThrownBy(() -> factory.create("test",
ImmutableMap.of(
"hive.metastore.uri", "thrift://foo:1234",
// Try setting any property provided by HiveConfig class
HiveConfig.CONFIGURATION_HIVE_PARTITION_PROJECTION_ENABLED, "true"),
new TestingConnectorContext()))
.hasMessageContaining("Error: Configuration property 'hive.partition-projection-enabled' was not used");
}

@Test
public void testReadOnlyAllAccessControl()
{
Expand Down

0 comments on commit 9919c35

Please sign in to comment.