From 813b4d5288c57976eebd1a6e0663a5ad2c3416a3 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Fri, 4 Aug 2023 14:51:50 +0200 Subject: [PATCH] Rename experimental config Safe change as the config was recently introduced. --- .../src/main/java/io/trino/sql/planner/OptimizerConfig.java | 4 +++- .../src/test/java/io/trino/cost/TestOptimizerConfig.java | 2 +- .../TestHiveMetastoreMetadataQueriesAccessOperations.java | 2 +- .../plugin/iceberg/TestIcebergMetadataFileOperations.java | 2 +- .../plugin/iceberg/TestIcebergMetastoreAccessOperations.java | 2 +- .../catalog/glue/TestIcebergGlueCatalogAccessOperations.java | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java b/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java index df48e79888b9..c26037c0e144 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java @@ -15,6 +15,7 @@ import io.airlift.configuration.Config; import io.airlift.configuration.ConfigDescription; +import io.airlift.configuration.ConfigHidden; import io.airlift.configuration.DefunctConfig; import io.airlift.configuration.LegacyConfig; import io.airlift.units.DataSize; @@ -237,7 +238,8 @@ public int getMaxPrefetchedInformationSchemaPrefixes() return maxPrefetchedInformationSchemaPrefixes; } - @Config("optimizer.max-prefetched-information-schema-prefixes") + @Config("optimizer.experimental-max-prefetched-information-schema-prefixes") + @ConfigHidden @ConfigDescription("Experimental: maximum number of internal \"prefixes\" to be prefetched when optimizing information_schema queries") public OptimizerConfig setMaxPrefetchedInformationSchemaPrefixes(int maxPrefetchedInformationSchemaPrefixes) { diff --git a/core/trino-main/src/test/java/io/trino/cost/TestOptimizerConfig.java b/core/trino-main/src/test/java/io/trino/cost/TestOptimizerConfig.java index 243203aa5e53..e73afb1d623e 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestOptimizerConfig.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestOptimizerConfig.java @@ -113,7 +113,7 @@ public void testExplicitPropertyMappings() .put("optimizer.join-multi-clause-independence-factor", "0.75") .put("optimizer.join-reordering-strategy", "NONE") .put("optimizer.max-reordered-joins", "5") - .put("optimizer.max-prefetched-information-schema-prefixes", "10") + .put("optimizer.experimental-max-prefetched-information-schema-prefixes", "10") .put("iterative-optimizer-timeout", "10s") .put("enable-forced-exchange-below-group-id", "false") .put("colocated-joins-enabled", "false") diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestHiveMetastoreMetadataQueriesAccessOperations.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestHiveMetastoreMetadataQueriesAccessOperations.java index ec99eadb1240..91f881655ddd 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestHiveMetastoreMetadataQueriesAccessOperations.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/metastore/thrift/TestHiveMetastoreMetadataQueriesAccessOperations.java @@ -75,7 +75,7 @@ protected QueryRunner createQueryRunner() .build()) // metadata queries do not use workers .setNodeCount(1) - .addCoordinatorProperty("optimizer.max-prefetched-information-schema-prefixes", Integer.toString(MAX_PREFIXES_COUNT)) + .addCoordinatorProperty("optimizer.experimental-max-prefetched-information-schema-prefixes", Integer.toString(MAX_PREFIXES_COUNT)) .build(); mockMetastore = new MockHiveMetastore(); diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataFileOperations.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataFileOperations.java index 74726a6903b4..809c27703aea 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataFileOperations.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataFileOperations.java @@ -87,7 +87,7 @@ protected DistributedQueryRunner createQueryRunner() // Tests that inspect MBean attributes need to run with just one node, otherwise // the attributes may come from the bound class instance in non-coordinator node .setNodeCount(1) - .addCoordinatorProperty("optimizer.max-prefetched-information-schema-prefixes", Integer.toString(MAX_PREFIXES_COUNT)) + .addCoordinatorProperty("optimizer.experimental-max-prefetched-information-schema-prefixes", Integer.toString(MAX_PREFIXES_COUNT)) .build(); File baseDir = queryRunner.getCoordinator().getBaseDataDir().resolve("iceberg_data").toFile(); diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetastoreAccessOperations.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetastoreAccessOperations.java index d7c66f30799f..56a2dc4a56a4 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetastoreAccessOperations.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetastoreAccessOperations.java @@ -67,7 +67,7 @@ protected DistributedQueryRunner createQueryRunner() throws Exception { DistributedQueryRunner queryRunner = DistributedQueryRunner.builder(TEST_SESSION) - .addCoordinatorProperty("optimizer.max-prefetched-information-schema-prefixes", Integer.toString(MAX_PREFIXES_COUNT)) + .addCoordinatorProperty("optimizer.experimental-max-prefetched-information-schema-prefixes", Integer.toString(MAX_PREFIXES_COUNT)) .build(); File baseDir = queryRunner.getCoordinator().getBaseDataDir().resolve("iceberg_data").toFile(); diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestIcebergGlueCatalogAccessOperations.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestIcebergGlueCatalogAccessOperations.java index 5ffec3329d1e..f26ae83bdaf3 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestIcebergGlueCatalogAccessOperations.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/catalog/glue/TestIcebergGlueCatalogAccessOperations.java @@ -110,7 +110,7 @@ protected QueryRunner createQueryRunner() { File tmp = Files.createTempDirectory("test_iceberg").toFile(); DistributedQueryRunner queryRunner = DistributedQueryRunner.builder(testSession) - .addCoordinatorProperty("optimizer.max-prefetched-information-schema-prefixes", Integer.toString(MAX_PREFIXES_COUNT)) + .addCoordinatorProperty("optimizer.experimental-max-prefetched-information-schema-prefixes", Integer.toString(MAX_PREFIXES_COUNT)) .build(); trackingFileSystemFactory = new TrackingFileSystemFactory(new HdfsFileSystemFactory(HDFS_ENVIRONMENT, HDFS_FILE_SYSTEM_STATS));