From 22050e2ac78d1084708b8acbcc82b8dc849634ed Mon Sep 17 00:00:00 2001 From: Yuya Ebihara Date: Wed, 23 Oct 2024 16:50:02 +0900 Subject: [PATCH] Rename `iceberg.add_files-procedure.enabled` to `iceberg.add-files-procedure.enabled` --- docs/src/main/sphinx/connector/iceberg.md | 4 ++-- .../src/main/java/io/trino/plugin/iceberg/IcebergConfig.java | 3 ++- .../test/java/io/trino/plugin/iceberg/TestIcebergConfig.java | 2 +- .../iceberg/procedure/TestIcebergAddFilesProcedure.java | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/src/main/sphinx/connector/iceberg.md b/docs/src/main/sphinx/connector/iceberg.md index 9c7cc8de286e5..3c0c13bdbbafc 100644 --- a/docs/src/main/sphinx/connector/iceberg.md +++ b/docs/src/main/sphinx/connector/iceberg.md @@ -168,7 +168,7 @@ implementation is used: * - `iceberg.register-table-procedure.enabled` - Enable to allow user to call [`register_table` procedure](iceberg-register-table). - `false` -* - `iceberg.add_files-procedure.enabled` +* - `iceberg.add-files-procedure.enabled` - Enable to allow user to call [`add_files` procedure](iceberg-add-files). - `false` * - `iceberg.query-partition-filter-required` @@ -590,7 +590,7 @@ nested directories, or `false` to ignore them. #### Add files The connector can add files from tables or locations to an existing table if -`iceberg.add_files-procedure.enabled` is set to `true` for the catalog. +`iceberg.add-files-procedure.enabled` is set to `true` for the catalog. Use the procedure `system.add_files_from_table` to add existing files from a Hive table or `system.add_files` to add existing files from a specified location diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConfig.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConfig.java index 7b0d5fd0c1896..53f3966427ed0 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConfig.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConfig.java @@ -261,7 +261,8 @@ public boolean isAddFilesProcedureEnabled() return addFilesProcedureEnabled; } - @Config("iceberg.add_files-procedure.enabled") + @Config("iceberg.add-files-procedure.enabled") + @LegacyConfig("iceberg.add_files-procedure.enabled") @ConfigDescription("Allow users to call the add_files procedure") public IcebergConfig setAddFilesProcedureEnabled(boolean addFilesProcedureEnabled) { diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConfig.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConfig.java index 2c0aa1907562d..9e6b13a1bdae3 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConfig.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConfig.java @@ -101,7 +101,7 @@ public void testExplicitPropertyMappings() .put("iceberg.materialized-views.hide-storage-table", "false") .put("iceberg.materialized-views.storage-schema", "mv_storage_schema") .put("iceberg.register-table-procedure.enabled", "true") - .put("iceberg.add_files-procedure.enabled", "true") + .put("iceberg.add-files-procedure.enabled", "true") .put("iceberg.sorted-writing-enabled", "false") .put("iceberg.query-partition-filter-required", "true") .put("iceberg.query-partition-filter-required-schemas", "bronze,silver") diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/procedure/TestIcebergAddFilesProcedure.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/procedure/TestIcebergAddFilesProcedure.java index 8d05bf437febd..89d18e620ab54 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/procedure/TestIcebergAddFilesProcedure.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/procedure/TestIcebergAddFilesProcedure.java @@ -39,7 +39,7 @@ protected QueryRunner createQueryRunner() dataDirectory = Files.createTempDirectory("_test_hidden"); QueryRunner queryRunner = IcebergQueryRunner.builder() .setMetastoreDirectory(dataDirectory.toFile()) - .addIcebergProperty("iceberg.add_files-procedure.enabled", "true") + .addIcebergProperty("iceberg.add-files-procedure.enabled", "true") .build(); queryRunner.installPlugin(new TestingHivePlugin(dataDirectory));