diff --git a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java index 9180d6fe68974..bc09c80d3e4ba 100644 --- a/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java +++ b/presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java @@ -151,6 +151,12 @@ public static QueryRunner createNativeQueryRunner( boolean addStorageFormatToPath) throws Exception { + // The property "hive.allow-drop-table" needs to be set to true because security is always "legacy" in NativeQueryRunner. + ImmutableMap hiveProperties = ImmutableMap.builder() + .putAll(getNativeWorkerHiveProperties(storageFormat)) + .put("hive.allow-drop-table", "true") + .build(); + // Make query runner with external workers for tests return HiveQueryRunner.createQueryRunner( ImmutableList.of(), @@ -162,7 +168,7 @@ public static QueryRunner createNativeQueryRunner( .build(), ImmutableMap.of(), "legacy", - getNativeWorkerHiveProperties(storageFormat), + hiveProperties, workerCount, Optional.of(Paths.get(addStorageFormatToPath ? dataDirectory + "/" + storageFormat : dataDirectory)), Optional.of((workerIndex, discoveryUri) -> {