From 297f1f1050fbc4b1cede1ddcd6eeb740f5e4b0c9 Mon Sep 17 00:00:00 2001 From: Karol Sobczak Date: Fri, 26 Nov 2021 14:28:56 +0100 Subject: [PATCH] Move FeatureConfig as top package class These configs are not specific to Trino analyzer. Therefore FeatureConfig should not be within sql.analyzer package --- .../io/trino/{sql/analyzer => }/FeaturesConfig.java | 3 ++- .../main/java/io/trino/SystemSessionProperties.java | 5 ++--- .../src/main/java/io/trino/cost/CostComparator.java | 2 +- .../main/java/io/trino/execution/CreateTableTask.java | 2 +- .../io/trino/execution/MemoryRevokingScheduler.java | 2 +- .../main/java/io/trino/metadata/FunctionRegistry.java | 2 +- .../main/java/io/trino/metadata/MetadataManager.java | 2 +- .../src/main/java/io/trino/metadata/TypeRegistry.java | 2 +- .../main/java/io/trino/operator/ExchangeClient.java | 2 +- .../java/io/trino/operator/ExchangeClientFactory.java | 4 ++-- .../java/io/trino/operator/HttpPageBufferClient.java | 2 +- .../src/main/java/io/trino/operator/PagesIndex.java | 2 +- .../java/io/trino/server/PagesResponseWriter.java | 4 ++-- .../main/java/io/trino/server/ServerMainModule.java | 2 +- .../trino/spiller/FileSingleStreamSpillerFactory.java | 4 ++-- .../iterative/rule/DetermineJoinDistributionType.java | 4 ++-- .../rule/DetermineSemiJoinDistributionType.java | 2 +- .../planner/iterative/rule/EliminateCrossJoins.java | 6 +++--- .../sql/planner/iterative/rule/ReorderJoins.java | 4 ++-- .../main/java/io/trino/testing/LocalQueryRunner.java | 2 +- .../test/java/io/trino/execution/TestCallTask.java | 2 +- .../java/io/trino/execution/TestCreateTableTask.java | 2 +- .../java/io/trino/execution/TestResetSessionTask.java | 2 +- .../test/java/io/trino/execution/TestSetPathTask.java | 2 +- .../test/java/io/trino/execution/TestSetRoleTask.java | 2 +- .../java/io/trino/execution/TestSetSessionTask.java | 2 +- .../trino/metadata/TestInformationSchemaMetadata.java | 2 +- .../io/trino/metadata/TestingFunctionResolution.java | 2 +- .../java/io/trino/operator/TestExchangeClient.java | 2 +- .../java/io/trino/operator/TestExchangeOperator.java | 2 +- .../io/trino/operator/TestHttpPageBufferClient.java | 2 +- .../java/io/trino/operator/TestMergeOperator.java | 2 +- .../trino/operator/scalar/AbstractTestFunctions.java | 2 +- .../operator/scalar/AbstractTestRegexpFunctions.java | 2 +- .../io/trino/operator/scalar/FunctionAssertions.java | 2 +- .../io/trino/server/TestQuerySessionSupplier.java | 2 +- .../java/io/trino/spiller/TestBinaryFileSpiller.java | 2 +- .../trino/spiller/TestGenericPartitioningSpiller.java | 2 +- .../test/java/io/trino/sql/analyzer/TestAnalyzer.java | 1 + .../io/trino/sql/analyzer/TestFeaturesConfig.java | 11 ++++++----- .../java/io/trino/sql/planner/TestDynamicFilter.java | 4 ++-- .../sql/planner/TestLocalDynamicFilterConsumer.java | 4 ++-- .../java/io/trino/sql/planner/TestLogicalPlanner.java | 4 ++-- .../trino/sql/planner/TestPlanMatchingFramework.java | 4 ++-- .../rule/TestCanonicalizeExpressionRewriter.java | 2 +- .../rule/TestDetermineJoinDistributionType.java | 2 +- .../rule/TestDetermineSemiJoinDistributionType.java | 2 +- .../sql/planner/iterative/rule/TestReorderJoins.java | 8 ++++---- .../planner/optimizations/TestAddExchangesPlans.java | 10 +++++----- .../optimizations/TestUnionWithReplicatedJoin.java | 2 +- .../trino/sql/planner/optimizations/TestWindow.java | 4 ++-- .../java/io/trino/type/TestArrayOperatorsLegacy.java | 2 +- .../java/io/trino/type/TestMapOperatorsLegacy.java | 2 +- .../java/io/trino/type/TestRowOperatorsLegacy.java | 2 +- .../io/trino/plugin/hive/TestHiveConnectorTest.java | 2 +- .../plugin/hive/TestHiveDistributedJoinQueries.java | 2 +- .../io/trino/plugin/hive/optimizer/TestHivePlans.java | 4 ++-- .../plugin/iceberg/BaseIcebergConnectorTest.java | 2 +- .../plugin/kudu/TestKuduIntegrationDynamicFilter.java | 4 ++-- .../trino/plugin/memory/TestMemoryConnectorTest.java | 4 ++-- .../trino/benchmark/SqlConsecutiveJoinBenchmark.java | 2 +- .../io/trino/sql/planner/TestTpcdsCostBasedPlan.java | 4 ++-- .../io/trino/sql/planner/TestTpchCostBasedPlan.java | 4 ++-- .../testing/AbstractTestIntegrationSmokeTest.java | 2 +- .../io/trino/testing/AbstractTestJoinQueries.java | 2 +- .../io/trino/testing/AbstractTestQueryFramework.java | 4 ++-- .../main/java/io/trino/testing/BaseConnectorTest.java | 2 +- .../testing/BaseDynamicPartitionPruningTest.java | 4 ++-- .../execution/TestCoordinatorDynamicFiltering.java | 8 ++++---- .../io/trino/tests/AbstractTestEngineOnlyQueries.java | 4 ++-- .../io/trino/tests/TestDictionaryAggregation.java | 2 +- .../trino/tests/TestDistributedEngineOnlyQueries.java | 2 +- .../trino/tests/TestLateMaterializationQueries.java | 4 ++-- .../java/io/trino/tests/TestQuerySpillLimits.java | 2 +- 74 files changed, 112 insertions(+), 110 deletions(-) rename core/trino-main/src/main/java/io/trino/{sql/analyzer => }/FeaturesConfig.java (99%) diff --git a/core/trino-main/src/main/java/io/trino/sql/analyzer/FeaturesConfig.java b/core/trino-main/src/main/java/io/trino/FeaturesConfig.java similarity index 99% rename from core/trino-main/src/main/java/io/trino/sql/analyzer/FeaturesConfig.java rename to core/trino-main/src/main/java/io/trino/FeaturesConfig.java index a39cd81533b9..9e2cba6a3399 100644 --- a/core/trino-main/src/main/java/io/trino/sql/analyzer/FeaturesConfig.java +++ b/core/trino-main/src/main/java/io/trino/FeaturesConfig.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.sql.analyzer; +package io.trino; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Splitter; @@ -23,6 +23,7 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; import io.airlift.units.MaxDataSize; +import io.trino.sql.analyzer.RegexLibrary; import javax.validation.constraints.DecimalMax; import javax.validation.constraints.DecimalMin; diff --git a/core/trino-main/src/main/java/io/trino/SystemSessionProperties.java b/core/trino-main/src/main/java/io/trino/SystemSessionProperties.java index c0f47c1f8576..521c8b7ade95 100644 --- a/core/trino-main/src/main/java/io/trino/SystemSessionProperties.java +++ b/core/trino-main/src/main/java/io/trino/SystemSessionProperties.java @@ -16,6 +16,8 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.execution.DynamicFilterConfig; import io.trino.execution.QueryManagerConfig; import io.trino.execution.TaskManagerConfig; @@ -24,9 +26,6 @@ import io.trino.memory.NodeMemoryConfig; import io.trino.spi.TrinoException; import io.trino.spi.session.PropertyMetadata; -import io.trino.sql.analyzer.FeaturesConfig; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/cost/CostComparator.java b/core/trino-main/src/main/java/io/trino/cost/CostComparator.java index 1b14afde5311..1d3cd882da8a 100644 --- a/core/trino-main/src/main/java/io/trino/cost/CostComparator.java +++ b/core/trino-main/src/main/java/io/trino/cost/CostComparator.java @@ -15,8 +15,8 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Ordering; +import io.trino.FeaturesConfig; import io.trino.Session; -import io.trino.sql.analyzer.FeaturesConfig; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/execution/CreateTableTask.java b/core/trino-main/src/main/java/io/trino/execution/CreateTableTask.java index dff8c57e0434..623b66a97f0a 100644 --- a/core/trino-main/src/main/java/io/trino/execution/CreateTableTask.java +++ b/core/trino-main/src/main/java/io/trino/execution/CreateTableTask.java @@ -18,6 +18,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.connector.CatalogName; import io.trino.execution.warnings.WarningCollector; @@ -33,7 +34,6 @@ import io.trino.spi.security.AccessDeniedException; import io.trino.spi.type.Type; import io.trino.spi.type.TypeNotFoundException; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.analyzer.Output; import io.trino.sql.analyzer.OutputColumn; import io.trino.sql.tree.ColumnDefinition; diff --git a/core/trino-main/src/main/java/io/trino/execution/MemoryRevokingScheduler.java b/core/trino-main/src/main/java/io/trino/execution/MemoryRevokingScheduler.java index fb0d19d7ccc6..532483371f7f 100644 --- a/core/trino-main/src/main/java/io/trino/execution/MemoryRevokingScheduler.java +++ b/core/trino-main/src/main/java/io/trino/execution/MemoryRevokingScheduler.java @@ -17,6 +17,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Ordering; import io.airlift.log.Logger; +import io.trino.FeaturesConfig; import io.trino.memory.LocalMemoryManager; import io.trino.memory.MemoryPool; import io.trino.memory.MemoryPoolListener; @@ -26,7 +27,6 @@ import io.trino.operator.PipelineContext; import io.trino.operator.TaskContext; import io.trino.spi.memory.MemoryPoolId; -import io.trino.sql.analyzer.FeaturesConfig; import javax.annotation.Nullable; import javax.annotation.PostConstruct; diff --git a/core/trino-main/src/main/java/io/trino/metadata/FunctionRegistry.java b/core/trino-main/src/main/java/io/trino/metadata/FunctionRegistry.java index 08b520bb6799..1d9750498460 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/FunctionRegistry.java +++ b/core/trino-main/src/main/java/io/trino/metadata/FunctionRegistry.java @@ -21,6 +21,7 @@ import com.google.common.collect.Maps; import com.google.common.collect.Multimap; import com.google.common.util.concurrent.UncheckedExecutionException; +import io.trino.FeaturesConfig; import io.trino.operator.aggregation.ApproximateCountDistinctAggregation; import io.trino.operator.aggregation.ApproximateDoublePercentileAggregations; import io.trino.operator.aggregation.ApproximateDoublePercentileArrayAggregations; @@ -241,7 +242,6 @@ import io.trino.spi.function.OperatorType; import io.trino.spi.type.TypeOperators; import io.trino.sql.DynamicFilters; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.tree.QualifiedName; import io.trino.type.BigintOperators; import io.trino.type.BlockTypeOperators; diff --git a/core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java b/core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java index 91bf292e5b83..f80caf9b7435 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java +++ b/core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java @@ -27,6 +27,7 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.UncheckedExecutionException; import io.airlift.slice.Slice; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.client.NodeVersion; import io.trino.connector.CatalogName; @@ -120,7 +121,6 @@ import io.trino.spi.type.TypeNotFoundException; import io.trino.spi.type.TypeOperators; import io.trino.spi.type.TypeSignature; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.analyzer.TypeSignatureProvider; import io.trino.sql.planner.ConnectorExpressions; import io.trino.sql.planner.PartitioningHandle; diff --git a/core/trino-main/src/main/java/io/trino/metadata/TypeRegistry.java b/core/trino-main/src/main/java/io/trino/metadata/TypeRegistry.java index 80c5c3e4adc3..a803cfdc8534 100644 --- a/core/trino-main/src/main/java/io/trino/metadata/TypeRegistry.java +++ b/core/trino-main/src/main/java/io/trino/metadata/TypeRegistry.java @@ -17,6 +17,7 @@ import com.google.common.cache.CacheBuilder; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.UncheckedExecutionException; +import io.trino.FeaturesConfig; import io.trino.spi.type.ParametricType; import io.trino.spi.type.Type; import io.trino.spi.type.TypeId; @@ -25,7 +26,6 @@ import io.trino.spi.type.TypeParameter; import io.trino.spi.type.TypeSignature; import io.trino.spi.type.TypeSignatureParameter; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.parser.SqlParser; import io.trino.type.CharParametricType; import io.trino.type.DecimalParametricType; diff --git a/core/trino-main/src/main/java/io/trino/operator/ExchangeClient.java b/core/trino-main/src/main/java/io/trino/operator/ExchangeClient.java index aec7539e4267..967d2d6ef7aa 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ExchangeClient.java +++ b/core/trino-main/src/main/java/io/trino/operator/ExchangeClient.java @@ -19,12 +19,12 @@ import io.airlift.http.client.HttpClient; import io.airlift.units.DataSize; import io.airlift.units.Duration; +import io.trino.FeaturesConfig.DataIntegrityVerification; import io.trino.execution.buffer.PageCodecMarker; import io.trino.execution.buffer.SerializedPage; import io.trino.memory.context.LocalMemoryContext; import io.trino.operator.HttpPageBufferClient.ClientCallback; import io.trino.operator.WorkProcessor.ProcessState; -import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import javax.annotation.Nullable; import javax.annotation.concurrent.GuardedBy; diff --git a/core/trino-main/src/main/java/io/trino/operator/ExchangeClientFactory.java b/core/trino-main/src/main/java/io/trino/operator/ExchangeClientFactory.java index 61160089cec0..34e766b9eab0 100644 --- a/core/trino-main/src/main/java/io/trino/operator/ExchangeClientFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/ExchangeClientFactory.java @@ -18,9 +18,9 @@ import io.airlift.node.NodeInfo; import io.airlift.units.DataSize; import io.airlift.units.Duration; +import io.trino.FeaturesConfig; +import io.trino.FeaturesConfig.DataIntegrityVerification; import io.trino.memory.context.LocalMemoryContext; -import io.trino.sql.analyzer.FeaturesConfig; -import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import org.weakref.jmx.Managed; import org.weakref.jmx.Nested; diff --git a/core/trino-main/src/main/java/io/trino/operator/HttpPageBufferClient.java b/core/trino-main/src/main/java/io/trino/operator/HttpPageBufferClient.java index 5760c1bae7e4..22ae8ea5846f 100644 --- a/core/trino-main/src/main/java/io/trino/operator/HttpPageBufferClient.java +++ b/core/trino-main/src/main/java/io/trino/operator/HttpPageBufferClient.java @@ -31,11 +31,11 @@ import io.airlift.slice.SliceInput; import io.airlift.units.DataSize; import io.airlift.units.Duration; +import io.trino.FeaturesConfig.DataIntegrityVerification; import io.trino.execution.buffer.SerializedPage; import io.trino.server.remotetask.Backoff; import io.trino.spi.TrinoException; import io.trino.spi.TrinoTransportException; -import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import org.joda.time.DateTime; import javax.annotation.Nullable; diff --git a/core/trino-main/src/main/java/io/trino/operator/PagesIndex.java b/core/trino-main/src/main/java/io/trino/operator/PagesIndex.java index c6cddec95659..c85763db8758 100644 --- a/core/trino-main/src/main/java/io/trino/operator/PagesIndex.java +++ b/core/trino-main/src/main/java/io/trino/operator/PagesIndex.java @@ -18,6 +18,7 @@ import io.airlift.log.Logger; import io.airlift.slice.Slice; import io.airlift.units.DataSize; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.geospatial.Rectangle; import io.trino.operator.SpatialIndexBuilderOperator.SpatialPredicate; @@ -32,7 +33,6 @@ import io.trino.spi.connector.SortOrder; import io.trino.spi.type.Type; import io.trino.spi.type.TypeOperators; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.gen.JoinCompiler; import io.trino.sql.gen.JoinCompiler.LookupSourceSupplierFactory; import io.trino.sql.gen.JoinFilterFunctionCompiler.JoinFilterFunctionFactory; diff --git a/core/trino-main/src/main/java/io/trino/server/PagesResponseWriter.java b/core/trino-main/src/main/java/io/trino/server/PagesResponseWriter.java index 832517cbe15e..c628a3bd99b7 100644 --- a/core/trino-main/src/main/java/io/trino/server/PagesResponseWriter.java +++ b/core/trino-main/src/main/java/io/trino/server/PagesResponseWriter.java @@ -16,9 +16,9 @@ import com.google.common.reflect.TypeToken; import io.airlift.slice.OutputStreamSliceOutput; import io.airlift.slice.SliceOutput; +import io.trino.FeaturesConfig; +import io.trino.FeaturesConfig.DataIntegrityVerification; import io.trino.execution.buffer.SerializedPage; -import io.trino.sql.analyzer.FeaturesConfig; -import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import javax.inject.Inject; import javax.ws.rs.Produces; diff --git a/core/trino-main/src/main/java/io/trino/server/ServerMainModule.java b/core/trino-main/src/main/java/io/trino/server/ServerMainModule.java index b768c9c62e15..433677d367f5 100644 --- a/core/trino-main/src/main/java/io/trino/server/ServerMainModule.java +++ b/core/trino-main/src/main/java/io/trino/server/ServerMainModule.java @@ -27,6 +27,7 @@ import io.airlift.stats.PauseMeter; import io.airlift.units.DataSize; import io.airlift.units.Duration; +import io.trino.FeaturesConfig; import io.trino.GroupByHashPageIndexerFactory; import io.trino.PagesIndexPageSorter; import io.trino.SystemSessionProperties; @@ -117,7 +118,6 @@ import io.trino.split.PageSourceProvider; import io.trino.split.SplitManager; import io.trino.sql.SqlEnvironmentConfig; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.gen.ExpressionCompiler; import io.trino.sql.gen.JoinCompiler; import io.trino.sql.gen.JoinFilterFunctionCompiler; diff --git a/core/trino-main/src/main/java/io/trino/spiller/FileSingleStreamSpillerFactory.java b/core/trino-main/src/main/java/io/trino/spiller/FileSingleStreamSpillerFactory.java index 9f4fffd13d00..efdf7d39543a 100644 --- a/core/trino-main/src/main/java/io/trino/spiller/FileSingleStreamSpillerFactory.java +++ b/core/trino-main/src/main/java/io/trino/spiller/FileSingleStreamSpillerFactory.java @@ -21,6 +21,7 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.inject.Inject; import io.airlift.log.Logger; +import io.trino.FeaturesConfig; import io.trino.execution.buffer.PagesSerde; import io.trino.execution.buffer.PagesSerdeFactory; import io.trino.memory.context.LocalMemoryContext; @@ -29,7 +30,6 @@ import io.trino.spi.TrinoException; import io.trino.spi.block.BlockEncodingSerde; import io.trino.spi.type.Type; -import io.trino.sql.analyzer.FeaturesConfig; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; @@ -44,8 +44,8 @@ import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; import static io.airlift.concurrent.Threads.daemonThreadsNamed; +import static io.trino.FeaturesConfig.SPILLER_SPILL_PATH; import static io.trino.spi.StandardErrorCode.OUT_OF_SPILL_SPACE; -import static io.trino.sql.analyzer.FeaturesConfig.SPILLER_SPILL_PATH; import static java.lang.String.format; import static java.nio.file.Files.createDirectories; import static java.nio.file.Files.createTempFile; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DetermineJoinDistributionType.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DetermineJoinDistributionType.java index 8bac0630c654..0d6b471a419d 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DetermineJoinDistributionType.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DetermineJoinDistributionType.java @@ -17,6 +17,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Ordering; import io.airlift.units.DataSize; +import io.trino.FeaturesConfig.JoinDistributionType; import io.trino.cost.CostComparator; import io.trino.cost.LocalCostEstimate; import io.trino.cost.PlanNodeStatsEstimate; @@ -24,7 +25,6 @@ import io.trino.cost.TaskCountEstimator; import io.trino.matching.Captures; import io.trino.matching.Pattern; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; import io.trino.sql.planner.TypeProvider; import io.trino.sql.planner.iterative.Lookup; import io.trino.sql.planner.iterative.Rule; @@ -38,10 +38,10 @@ import java.util.ArrayList; import java.util.List; +import static io.trino.FeaturesConfig.JoinDistributionType.AUTOMATIC; import static io.trino.SystemSessionProperties.getJoinDistributionType; import static io.trino.SystemSessionProperties.getJoinMaxBroadcastTableSize; import static io.trino.cost.CostCalculatorWithEstimatedExchanges.calculateJoinCostWithoutOutput; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.AUTOMATIC; import static io.trino.sql.planner.optimizations.QueryCardinalityUtil.isAtMostScalar; import static io.trino.sql.planner.plan.JoinNode.DistributionType.PARTITIONED; import static io.trino.sql.planner.plan.JoinNode.DistributionType.REPLICATED; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DetermineSemiJoinDistributionType.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DetermineSemiJoinDistributionType.java index 677b9a477846..15996f809654 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DetermineSemiJoinDistributionType.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/DetermineSemiJoinDistributionType.java @@ -15,6 +15,7 @@ import com.google.common.collect.Ordering; import io.airlift.units.DataSize; +import io.trino.FeaturesConfig.JoinDistributionType; import io.trino.cost.CostComparator; import io.trino.cost.LocalCostEstimate; import io.trino.cost.PlanNodeStatsEstimate; @@ -22,7 +23,6 @@ import io.trino.cost.TaskCountEstimator; import io.trino.matching.Captures; import io.trino.matching.Pattern; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; import io.trino.sql.planner.TypeProvider; import io.trino.sql.planner.iterative.Rule; import io.trino.sql.planner.plan.PlanNode; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/EliminateCrossJoins.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/EliminateCrossJoins.java index 89f880ac016a..539fe3ac0d66 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/EliminateCrossJoins.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/EliminateCrossJoins.java @@ -16,11 +16,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.Session; import io.trino.matching.Captures; import io.trino.matching.Pattern; import io.trino.metadata.Metadata; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.sql.planner.PlanNodeIdAllocator; import io.trino.sql.planner.Symbol; import io.trino.sql.planner.TypeAnalyzer; @@ -43,9 +43,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableList.toImmutableList; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.AUTOMATIC; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; import static io.trino.SystemSessionProperties.getJoinReorderingStrategy; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.AUTOMATIC; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; import static io.trino.sql.planner.iterative.rule.Util.restrictOutputs; import static io.trino.sql.planner.plan.Patterns.join; import static java.util.Comparator.comparing; diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ReorderJoins.java b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ReorderJoins.java index 9fc48022d3b6..849dca596c59 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ReorderJoins.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/ReorderJoins.java @@ -22,6 +22,7 @@ import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import io.airlift.log.Logger; +import io.trino.FeaturesConfig.JoinDistributionType; import io.trino.Session; import io.trino.cost.CostComparator; import io.trino.cost.CostProvider; @@ -32,7 +33,6 @@ import io.trino.matching.Captures; import io.trino.matching.Pattern; import io.trino.metadata.Metadata; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; import io.trino.sql.planner.EqualityInference; import io.trino.sql.planner.PlanNodeIdAllocator; import io.trino.sql.planner.Symbol; @@ -69,13 +69,13 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Sets.powerSet; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.AUTOMATIC; import static io.trino.SystemSessionProperties.getJoinDistributionType; import static io.trino.SystemSessionProperties.getJoinReorderingStrategy; import static io.trino.SystemSessionProperties.getMaxReorderedJoins; import static io.trino.sql.ExpressionUtils.and; import static io.trino.sql.ExpressionUtils.combineConjuncts; import static io.trino.sql.ExpressionUtils.extractConjuncts; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.AUTOMATIC; import static io.trino.sql.planner.DeterminismEvaluator.isDeterministic; import static io.trino.sql.planner.EqualityInference.nonInferrableConjuncts; import static io.trino.sql.planner.iterative.rule.DetermineJoinDistributionType.canReplicate; diff --git a/core/trino-main/src/main/java/io/trino/testing/LocalQueryRunner.java b/core/trino-main/src/main/java/io/trino/testing/LocalQueryRunner.java index e1f7dbc3b9ba..4f5990dcf71c 100644 --- a/core/trino-main/src/main/java/io/trino/testing/LocalQueryRunner.java +++ b/core/trino-main/src/main/java/io/trino/testing/LocalQueryRunner.java @@ -19,6 +19,7 @@ import com.google.common.io.Closer; import io.airlift.node.NodeInfo; import io.airlift.units.Duration; +import io.trino.FeaturesConfig; import io.trino.GroupByHashPageIndexerFactory; import io.trino.PagesIndexPageSorter; import io.trino.Session; @@ -148,7 +149,6 @@ import io.trino.split.SplitSource; import io.trino.sql.analyzer.Analysis; import io.trino.sql.analyzer.Analyzer; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.analyzer.QueryExplainer; import io.trino.sql.gen.ExpressionCompiler; import io.trino.sql.gen.JoinCompiler; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestCallTask.java b/core/trino-main/src/test/java/io/trino/execution/TestCallTask.java index 499dd15b61d8..076aa240ce05 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestCallTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestCallTask.java @@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.connector.CatalogName; import io.trino.execution.warnings.WarningCollector; @@ -29,7 +30,6 @@ import io.trino.spi.procedure.Procedure; import io.trino.spi.resourcegroups.ResourceGroupId; import io.trino.spi.security.AccessDeniedException; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.tree.Call; import io.trino.sql.tree.QualifiedName; import io.trino.testing.TestingAccessControlManager; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestCreateTableTask.java b/core/trino-main/src/test/java/io/trino/execution/TestCreateTableTask.java index 0b115bc9ad94..51e390339341 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestCreateTableTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestCreateTableTask.java @@ -15,6 +15,7 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.connector.CatalogName; import io.trino.eventlistener.EventListenerConfig; @@ -40,7 +41,6 @@ import io.trino.spi.type.Type; import io.trino.spi.type.TypeId; import io.trino.spi.type.TypeSignature; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.planner.TestingConnectorTransactionHandle; import io.trino.sql.tree.ColumnDefinition; import io.trino.sql.tree.CreateTable; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestResetSessionTask.java b/core/trino-main/src/test/java/io/trino/execution/TestResetSessionTask.java index 18e149967833..6ef6ce11b058 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestResetSessionTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestResetSessionTask.java @@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.execution.warnings.WarningCollector; import io.trino.metadata.Catalog; @@ -23,7 +24,6 @@ import io.trino.security.AccessControl; import io.trino.security.AllowAllAccessControl; import io.trino.spi.resourcegroups.ResourceGroupId; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.tree.QualifiedName; import io.trino.sql.tree.ResetSession; import io.trino.transaction.TransactionManager; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestSetPathTask.java b/core/trino-main/src/test/java/io/trino/execution/TestSetPathTask.java index cc0d0b1ccec9..6ba022d91167 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestSetPathTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestSetPathTask.java @@ -14,6 +14,7 @@ package io.trino.execution; import com.google.common.collect.ImmutableList; +import io.trino.FeaturesConfig; import io.trino.execution.warnings.WarningCollector; import io.trino.metadata.CatalogManager; import io.trino.metadata.Metadata; @@ -21,7 +22,6 @@ import io.trino.security.AllowAllAccessControl; import io.trino.spi.TrinoException; import io.trino.spi.resourcegroups.ResourceGroupId; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.tree.Identifier; import io.trino.sql.tree.PathElement; import io.trino.sql.tree.PathSpecification; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestSetRoleTask.java b/core/trino-main/src/test/java/io/trino/execution/TestSetRoleTask.java index 6c8baf5baac0..82cdc9259d6b 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestSetRoleTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestSetRoleTask.java @@ -16,6 +16,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import io.trino.FeaturesConfig; import io.trino.connector.CatalogName; import io.trino.connector.MockConnectorFactory; import io.trino.connector.system.StaticSystemTablesProvider; @@ -36,7 +37,6 @@ import io.trino.spi.security.SelectedRole; import io.trino.spi.security.TrinoPrincipal; import io.trino.spi.transaction.IsolationLevel; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.parser.ParsingOptions; import io.trino.sql.parser.SqlParser; import io.trino.sql.tree.SetRole; diff --git a/core/trino-main/src/test/java/io/trino/execution/TestSetSessionTask.java b/core/trino-main/src/test/java/io/trino/execution/TestSetSessionTask.java index 93d24a4a81f0..906aad6173af 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TestSetSessionTask.java +++ b/core/trino-main/src/test/java/io/trino/execution/TestSetSessionTask.java @@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig; import io.trino.execution.warnings.WarningCollector; import io.trino.metadata.Catalog; import io.trino.metadata.CatalogManager; @@ -25,7 +26,6 @@ import io.trino.spi.TrinoException; import io.trino.spi.resourcegroups.ResourceGroupId; import io.trino.spi.session.PropertyMetadata; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.tree.Expression; import io.trino.sql.tree.FunctionCall; import io.trino.sql.tree.LongLiteral; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestInformationSchemaMetadata.java b/core/trino-main/src/test/java/io/trino/metadata/TestInformationSchemaMetadata.java index 320036a16a4f..dcffc3fe9a5f 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestInformationSchemaMetadata.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestInformationSchemaMetadata.java @@ -18,6 +18,7 @@ import com.google.common.collect.ImmutableSet; import io.airlift.slice.Slice; import io.airlift.slice.Slices; +import io.trino.FeaturesConfig; import io.trino.client.ClientCapabilities; import io.trino.connector.CatalogName; import io.trino.connector.MockConnectorFactory; @@ -38,7 +39,6 @@ import io.trino.spi.predicate.Domain; import io.trino.spi.predicate.NullableValue; import io.trino.spi.predicate.TupleDomain; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.testing.TestingConnectorContext; import io.trino.transaction.TransactionId; import io.trino.transaction.TransactionManager; diff --git a/core/trino-main/src/test/java/io/trino/metadata/TestingFunctionResolution.java b/core/trino-main/src/test/java/io/trino/metadata/TestingFunctionResolution.java index 066542cfccba..a73e6fa14f3f 100644 --- a/core/trino-main/src/test/java/io/trino/metadata/TestingFunctionResolution.java +++ b/core/trino-main/src/test/java/io/trino/metadata/TestingFunctionResolution.java @@ -13,6 +13,7 @@ */ package io.trino.metadata; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.operator.aggregation.InternalAggregationFunction; import io.trino.security.AllowAllAccessControl; @@ -20,7 +21,6 @@ import io.trino.spi.function.OperatorType; import io.trino.spi.type.Type; import io.trino.spi.type.TypeSignature; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.analyzer.TypeSignatureProvider; import io.trino.sql.gen.ExpressionCompiler; import io.trino.sql.gen.PageFunctionCompiler; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestExchangeClient.java b/core/trino-main/src/test/java/io/trino/operator/TestExchangeClient.java index bfe63b5050c8..36be978b6929 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestExchangeClient.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestExchangeClient.java @@ -25,13 +25,13 @@ import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; import io.airlift.units.Duration; +import io.trino.FeaturesConfig.DataIntegrityVerification; import io.trino.block.BlockAssertions; import io.trino.execution.buffer.PagesSerde; import io.trino.execution.buffer.SerializedPage; import io.trino.memory.context.SimpleLocalMemoryContext; import io.trino.spi.Page; import io.trino.spi.TrinoException; -import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestExchangeOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestExchangeOperator.java index 4ba2122a0514..8008ebedf83c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestExchangeOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestExchangeOperator.java @@ -21,6 +21,7 @@ import io.airlift.http.client.testing.TestingHttpClient; import io.airlift.units.DataSize; import io.airlift.units.Duration; +import io.trino.FeaturesConfig.DataIntegrityVerification; import io.trino.execution.Lifespan; import io.trino.execution.buffer.PagesSerdeFactory; import io.trino.execution.buffer.TestingPagesSerdeFactory; @@ -29,7 +30,6 @@ import io.trino.spi.Page; import io.trino.spi.type.Type; import io.trino.split.RemoteSplit; -import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestHttpPageBufferClient.java b/core/trino-main/src/test/java/io/trino/operator/TestHttpPageBufferClient.java index 3c3a936e0f5f..93ab3eab7005 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestHttpPageBufferClient.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestHttpPageBufferClient.java @@ -23,6 +23,7 @@ import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; import io.airlift.units.Duration; +import io.trino.FeaturesConfig.DataIntegrityVerification; import io.trino.execution.buffer.PagesSerde; import io.trino.execution.buffer.SerializedPage; import io.trino.operator.HttpPageBufferClient.ClientCallback; @@ -30,7 +31,6 @@ import io.trino.spi.Page; import io.trino.spi.TrinoException; import io.trino.spi.block.RunLengthEncodedBlock; -import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/operator/TestMergeOperator.java b/core/trino-main/src/test/java/io/trino/operator/TestMergeOperator.java index 10a50968adef..75e23ae6caff 100644 --- a/core/trino-main/src/test/java/io/trino/operator/TestMergeOperator.java +++ b/core/trino-main/src/test/java/io/trino/operator/TestMergeOperator.java @@ -20,6 +20,7 @@ import io.airlift.http.client.HttpClient; import io.airlift.http.client.testing.TestingHttpClient; import io.airlift.node.NodeInfo; +import io.trino.FeaturesConfig; import io.trino.execution.Lifespan; import io.trino.execution.buffer.PagesSerdeFactory; import io.trino.execution.buffer.TestingPagesSerdeFactory; @@ -29,7 +30,6 @@ import io.trino.spi.type.Type; import io.trino.spi.type.TypeOperators; import io.trino.split.RemoteSplit; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.gen.OrderingCompiler; import io.trino.sql.planner.plan.PlanNodeId; import org.testng.annotations.AfterMethod; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestFunctions.java index b1f92aa764af..830a4ab9659c 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestFunctions.java @@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.metadata.FunctionListBuilder; import io.trino.metadata.SqlScalarFunction; @@ -27,7 +28,6 @@ import io.trino.spi.type.SqlDecimal; import io.trino.spi.type.SqlTimestamp; import io.trino.spi.type.Type; -import io.trino.sql.analyzer.FeaturesConfig; import org.intellij.lang.annotations.Language; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestRegexpFunctions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestRegexpFunctions.java index a27bfce72f02..7fd2309309df 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestRegexpFunctions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestRegexpFunctions.java @@ -16,13 +16,13 @@ import com.google.common.collect.ImmutableList; import io.airlift.slice.Slice; import io.airlift.slice.Slices; +import io.trino.FeaturesConfig; import io.trino.spi.function.ScalarFunction; import io.trino.spi.function.SqlType; import io.trino.spi.type.ArrayType; import io.trino.spi.type.BigintType; import io.trino.spi.type.IntegerType; import io.trino.spi.type.StandardTypes; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.analyzer.RegexLibrary; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/FunctionAssertions.java b/core/trino-main/src/test/java/io/trino/operator/scalar/FunctionAssertions.java index 6ac5fbebdc8c..68e2f7b1bccd 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/FunctionAssertions.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/FunctionAssertions.java @@ -21,6 +21,7 @@ import io.airlift.slice.Slice; import io.airlift.slice.Slices; import io.airlift.units.DataSize; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.connector.CatalogName; import io.trino.execution.Lifespan; @@ -60,7 +61,6 @@ import io.trino.spi.type.Type; import io.trino.spi.type.TypeOperators; import io.trino.split.PageSourceProvider; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.gen.ExpressionCompiler; import io.trino.sql.planner.ExpressionInterpreter; import io.trino.sql.planner.Symbol; diff --git a/core/trino-main/src/test/java/io/trino/server/TestQuerySessionSupplier.java b/core/trino-main/src/test/java/io/trino/server/TestQuerySessionSupplier.java index 4863c60cfb40..0af7013935cf 100644 --- a/core/trino-main/src/test/java/io/trino/server/TestQuerySessionSupplier.java +++ b/core/trino-main/src/test/java/io/trino/server/TestQuerySessionSupplier.java @@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ListMultimap; import io.airlift.jaxrs.testing.GuavaMultivaluedMap; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.metadata.Metadata; import io.trino.metadata.SessionPropertyManager; @@ -29,7 +30,6 @@ import io.trino.sql.SqlEnvironmentConfig; import io.trino.sql.SqlPath; import io.trino.sql.SqlPathElement; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.tree.Identifier; import io.trino.transaction.TransactionManager; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/spiller/TestBinaryFileSpiller.java b/core/trino-main/src/test/java/io/trino/spiller/TestBinaryFileSpiller.java index f1cc64e66274..6fa40485eea2 100644 --- a/core/trino-main/src/test/java/io/trino/spiller/TestBinaryFileSpiller.java +++ b/core/trino-main/src/test/java/io/trino/spiller/TestBinaryFileSpiller.java @@ -14,6 +14,7 @@ package io.trino.spiller; import com.google.common.collect.ImmutableList; +import io.trino.FeaturesConfig; import io.trino.RowPagesBuilder; import io.trino.execution.buffer.PagesSerde; import io.trino.execution.buffer.PagesSerdeFactory; @@ -22,7 +23,6 @@ import io.trino.spi.Page; import io.trino.spi.block.BlockBuilder; import io.trino.spi.type.Type; -import io.trino.sql.analyzer.FeaturesConfig; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; diff --git a/core/trino-main/src/test/java/io/trino/spiller/TestGenericPartitioningSpiller.java b/core/trino-main/src/test/java/io/trino/spiller/TestGenericPartitioningSpiller.java index fae7a960d6d6..2e6876174520 100644 --- a/core/trino-main/src/test/java/io/trino/spiller/TestGenericPartitioningSpiller.java +++ b/core/trino-main/src/test/java/io/trino/spiller/TestGenericPartitioningSpiller.java @@ -16,6 +16,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.io.Closer; +import io.trino.FeaturesConfig; import io.trino.RowPagesBuilder; import io.trino.SequencePageBuilder; import io.trino.memory.context.AggregatedMemoryContext; @@ -25,7 +26,6 @@ import io.trino.spi.Page; import io.trino.spi.type.Type; import io.trino.spiller.PartitioningSpiller.PartitioningSpillResult; -import io.trino.sql.analyzer.FeaturesConfig; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/sql/analyzer/TestAnalyzer.java b/core/trino-main/src/test/java/io/trino/sql/analyzer/TestAnalyzer.java index b0339bc08f96..5a8dd3cf59e3 100644 --- a/core/trino-main/src/test/java/io/trino/sql/analyzer/TestAnalyzer.java +++ b/core/trino-main/src/test/java/io/trino/sql/analyzer/TestAnalyzer.java @@ -17,6 +17,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.SystemSessionProperties; import io.trino.connector.CatalogName; diff --git a/core/trino-main/src/test/java/io/trino/sql/analyzer/TestFeaturesConfig.java b/core/trino-main/src/test/java/io/trino/sql/analyzer/TestFeaturesConfig.java index b701193202e4..cc44f1bebeed 100644 --- a/core/trino-main/src/test/java/io/trino/sql/analyzer/TestFeaturesConfig.java +++ b/core/trino-main/src/test/java/io/trino/sql/analyzer/TestFeaturesConfig.java @@ -16,9 +16,10 @@ import com.google.common.collect.ImmutableMap; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.trino.sql.analyzer.FeaturesConfig.DataIntegrityVerification; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; +import io.trino.FeaturesConfig; +import io.trino.FeaturesConfig.DataIntegrityVerification; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import org.testng.annotations.Test; import java.util.Map; @@ -29,8 +30,8 @@ import static io.airlift.units.DataSize.Unit.GIGABYTE; import static io.airlift.units.DataSize.Unit.KILOBYTE; import static io.airlift.units.DataSize.Unit.MEGABYTE; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.sql.analyzer.RegexLibrary.JONI; import static io.trino.sql.analyzer.RegexLibrary.RE2J; import static java.util.concurrent.TimeUnit.MINUTES; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestDynamicFilter.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestDynamicFilter.java index dc56b717590e..05a7cccfe78b 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestDynamicFilter.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestDynamicFilter.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.Session; import io.trino.cost.StatsProvider; import io.trino.metadata.Metadata; import io.trino.sql.DynamicFilters; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.sql.planner.assertions.BasePlanTest; import io.trino.sql.planner.assertions.MatchResult; import io.trino.sql.planner.assertions.Matcher; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalDynamicFilterConsumer.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalDynamicFilterConsumer.java index 134ba0a70fbc..a3bbbb412e7f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalDynamicFilterConsumer.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestLocalDynamicFilterConsumer.java @@ -18,10 +18,10 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.spi.predicate.Domain; import io.trino.spi.predicate.TupleDomain; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.sql.planner.assertions.BasePlanTest; import io.trino.sql.planner.iterative.rule.test.PlanBuilder; import io.trino.sql.planner.plan.DynamicFilterId; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestLogicalPlanner.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestLogicalPlanner.java index 2a61e2cdd23f..56766fe4d1a2 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestLogicalPlanner.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestLogicalPlanner.java @@ -16,6 +16,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.Session; import io.trino.plugin.tpch.TpchColumnHandle; import io.trino.plugin.tpch.TpchTableHandle; @@ -26,8 +28,6 @@ import io.trino.spi.predicate.TupleDomain; import io.trino.spi.predicate.ValueSet; import io.trino.spi.type.RowType; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.sql.planner.assertions.BasePlanTest; import io.trino.sql.planner.assertions.ExpressionMatcher; import io.trino.sql.planner.assertions.PlanMatchPattern; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/TestPlanMatchingFramework.java b/core/trino-main/src/test/java/io/trino/sql/planner/TestPlanMatchingFramework.java index 1f8757895f37..c9544cceb207 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/TestPlanMatchingFramework.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/TestPlanMatchingFramework.java @@ -15,9 +15,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.Session; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.sql.planner.assertions.BasePlanTest; import io.trino.sql.planner.plan.OutputNode; import io.trino.sql.planner.plan.TableScanNode; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestCanonicalizeExpressionRewriter.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestCanonicalizeExpressionRewriter.java index b7511cd1ab7e..a52c9e0d2d21 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestCanonicalizeExpressionRewriter.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestCanonicalizeExpressionRewriter.java @@ -14,10 +14,10 @@ package io.trino.sql.planner.iterative.rule; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig; import io.trino.metadata.Metadata; import io.trino.security.AllowAllAccessControl; import io.trino.spi.type.Type; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.parser.SqlParser; import io.trino.sql.planner.Symbol; import io.trino.sql.planner.TypeAnalyzer; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineJoinDistributionType.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineJoinDistributionType.java index c99248f45815..e8a0a3760f1d 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineJoinDistributionType.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineJoinDistributionType.java @@ -16,12 +16,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig.JoinDistributionType; import io.trino.cost.CostComparator; import io.trino.cost.PlanNodeStatsEstimate; import io.trino.cost.SymbolStatsEstimate; import io.trino.cost.TaskCountEstimator; import io.trino.spi.type.VarcharType; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; import io.trino.sql.planner.PlanNodeIdAllocator; import io.trino.sql.planner.Symbol; import io.trino.sql.planner.iterative.rule.test.PlanBuilder; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineSemiJoinDistributionType.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineSemiJoinDistributionType.java index 830808fdecb1..70405e21cf57 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineSemiJoinDistributionType.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineSemiJoinDistributionType.java @@ -15,12 +15,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig.JoinDistributionType; import io.trino.cost.CostComparator; import io.trino.cost.PlanNodeStatsEstimate; import io.trino.cost.SymbolStatsEstimate; import io.trino.cost.TaskCountEstimator; import io.trino.spi.type.Type; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; import io.trino.sql.planner.Symbol; import io.trino.sql.planner.iterative.rule.test.RuleAssert; import io.trino.sql.planner.iterative.rule.test.RuleTester; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestReorderJoins.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestReorderJoins.java index efedcb344f3b..6dd6eff62d82 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestReorderJoins.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestReorderJoins.java @@ -15,14 +15,14 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.cost.CostComparator; import io.trino.cost.PlanNodeStatsEstimate; import io.trino.cost.SymbolStatsEstimate; import io.trino.metadata.Metadata; import io.trino.metadata.TestingFunctionResolution; import io.trino.spi.type.Type; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.sql.parser.SqlParser; import io.trino.sql.planner.Symbol; import io.trino.sql.planner.TypeAnalyzer; @@ -42,13 +42,13 @@ import java.util.Optional; import static io.airlift.testing.Closeables.closeAllRuntimeException; +import static io.trino.FeaturesConfig.JoinDistributionType.AUTOMATIC; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; import static io.trino.metadata.MetadataManager.createTestMetadataManager; import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.AUTOMATIC; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; import static io.trino.sql.planner.assertions.PlanMatchPattern.expression; import static io.trino.sql.planner.assertions.PlanMatchPattern.join; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestAddExchangesPlans.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestAddExchangesPlans.java index 20233b554bb8..710b8135d431 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestAddExchangesPlans.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestAddExchangesPlans.java @@ -17,11 +17,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import io.trino.FeaturesConfig; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.Session; import io.trino.plugin.tpch.TpchConnectorFactory; -import io.trino.sql.analyzer.FeaturesConfig; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.sql.planner.assertions.BasePlanTest; import io.trino.sql.planner.assertions.PlanMatchPattern; import io.trino.sql.planner.assertions.RowNumberSymbolMatcher; @@ -36,13 +36,13 @@ import java.util.Optional; +import static io.trino.FeaturesConfig.JoinDistributionType.PARTITIONED; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; import static io.trino.SystemSessionProperties.IGNORE_DOWNSTREAM_PREFERENCES; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; import static io.trino.SystemSessionProperties.SPILL_ENABLED; import static io.trino.SystemSessionProperties.TASK_CONCURRENCY; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.PARTITIONED; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; import static io.trino.sql.planner.assertions.PlanMatchPattern.any; import static io.trino.sql.planner.assertions.PlanMatchPattern.anyNot; diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestUnionWithReplicatedJoin.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestUnionWithReplicatedJoin.java index 0b71315541fc..811131d11f39 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestUnionWithReplicatedJoin.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestUnionWithReplicatedJoin.java @@ -15,8 +15,8 @@ import com.google.common.collect.ImmutableMap; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; public class TestUnionWithReplicatedJoin extends TestUnion diff --git a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestWindow.java b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestWindow.java index 9db5fedad8f2..116edd0a7bea 100644 --- a/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestWindow.java +++ b/core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestWindow.java @@ -15,18 +15,18 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig; import io.trino.Session; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.sql.planner.assertions.BasePlanTest; import org.testng.annotations.Test; import java.util.Optional; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; import static io.trino.SystemSessionProperties.FORCE_SINGLE_NODE_OUTPUT; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; import static io.trino.sql.planner.assertions.PlanMatchPattern.aggregation; import static io.trino.sql.planner.assertions.PlanMatchPattern.anyTree; import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; diff --git a/core/trino-main/src/test/java/io/trino/type/TestArrayOperatorsLegacy.java b/core/trino-main/src/test/java/io/trino/type/TestArrayOperatorsLegacy.java index c1ea3cd9190a..e7bb543daa31 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestArrayOperatorsLegacy.java +++ b/core/trino-main/src/test/java/io/trino/type/TestArrayOperatorsLegacy.java @@ -14,12 +14,12 @@ package io.trino.type; import io.airlift.slice.Slice; +import io.trino.FeaturesConfig; import io.trino.operator.scalar.AbstractTestFunctions; import io.trino.spi.function.LiteralParameters; import io.trino.spi.function.ScalarFunction; import io.trino.spi.function.SqlType; import io.trino.spi.type.StandardTypes; -import io.trino.sql.analyzer.FeaturesConfig; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/type/TestMapOperatorsLegacy.java b/core/trino-main/src/test/java/io/trino/type/TestMapOperatorsLegacy.java index 62b185856346..3f6ddc0bf2ea 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestMapOperatorsLegacy.java +++ b/core/trino-main/src/test/java/io/trino/type/TestMapOperatorsLegacy.java @@ -14,12 +14,12 @@ package io.trino.type; import io.airlift.slice.Slice; +import io.trino.FeaturesConfig; import io.trino.operator.scalar.AbstractTestFunctions; import io.trino.spi.function.LiteralParameters; import io.trino.spi.function.ScalarFunction; import io.trino.spi.function.SqlType; import io.trino.spi.type.StandardTypes; -import io.trino.sql.analyzer.FeaturesConfig; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/core/trino-main/src/test/java/io/trino/type/TestRowOperatorsLegacy.java b/core/trino-main/src/test/java/io/trino/type/TestRowOperatorsLegacy.java index ce2f1d2a1ea3..aba4f5f68e20 100644 --- a/core/trino-main/src/test/java/io/trino/type/TestRowOperatorsLegacy.java +++ b/core/trino-main/src/test/java/io/trino/type/TestRowOperatorsLegacy.java @@ -14,12 +14,12 @@ package io.trino.type; import io.airlift.slice.Slice; +import io.trino.FeaturesConfig; import io.trino.operator.scalar.AbstractTestFunctions; import io.trino.spi.function.LiteralParameters; import io.trino.spi.function.ScalarFunction; import io.trino.spi.function.SqlType; import io.trino.spi.type.StandardTypes; -import io.trino.sql.analyzer.FeaturesConfig; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorTest.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorTest.java index 319b031daa18..77f8f19a88ca 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorTest.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorTest.java @@ -97,6 +97,7 @@ import static com.google.common.io.Files.createTempDir; import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.SystemSessionProperties.COLOCATED_JOIN; import static io.trino.SystemSessionProperties.CONCURRENT_LIFESPANS_PER_NODE; import static io.trino.SystemSessionProperties.DYNAMIC_SCHEDULE_FOR_GROUPED_EXECUTION; @@ -133,7 +134,6 @@ import static io.trino.spi.type.VarcharType.VARCHAR; import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static io.trino.spi.type.VarcharType.createVarcharType; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.sql.planner.optimizations.PlanNodeSearcher.searchFrom; import static io.trino.sql.planner.planprinter.IoPlanPrinter.FormattedMarker.Bound.ABOVE; import static io.trino.sql.planner.planprinter.IoPlanPrinter.FormattedMarker.Bound.EXACTLY; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedJoinQueries.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedJoinQueries.java index af63989ab370..c8c171995286 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedJoinQueries.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveDistributedJoinQueries.java @@ -13,11 +13,11 @@ */ package io.trino.plugin.hive; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.execution.DynamicFilterConfig; import io.trino.metadata.QualifiedObjectName; import io.trino.operator.OperatorStats; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.testing.AbstractTestJoinQueries; import io.trino.testing.MaterializedResult; import io.trino.testing.QueryRunner; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestHivePlans.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestHivePlans.java index dc13bf98455a..6b3d93b59cec 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestHivePlans.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/optimizer/TestHivePlans.java @@ -15,6 +15,8 @@ import com.google.common.collect.ImmutableSet; import com.google.common.io.Files; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.Session; import io.trino.plugin.hive.HdfsConfig; import io.trino.plugin.hive.HdfsConfiguration; @@ -31,8 +33,6 @@ import io.trino.plugin.hive.metastore.file.FileHiveMetastore; import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; import io.trino.spi.security.PrincipalType; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.sql.planner.assertions.BasePlanTest; import io.trino.testing.LocalQueryRunner; import io.trino.testing.QueryRunner; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java index ec3cdb6d812a..66631f174110 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java @@ -18,6 +18,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.airlift.units.DataSize; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.metadata.Metadata; import io.trino.metadata.QualifiedObjectName; @@ -34,7 +35,6 @@ import io.trino.spi.predicate.TupleDomain; import io.trino.spi.statistics.ColumnStatistics; import io.trino.spi.statistics.TableStatistics; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.testing.BaseConnectorTest; import io.trino.testing.MaterializedResult; import io.trino.testing.MaterializedRow; diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationDynamicFilter.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationDynamicFilter.java index b25f6f06151a..96f4a13116f7 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationDynamicFilter.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduIntegrationDynamicFilter.java @@ -49,14 +49,14 @@ import java.util.concurrent.TimeUnit; import static com.google.common.collect.ImmutableList.toImmutableList; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunnerTpch; import static io.trino.spi.connector.ConnectorSplitManager.SplitSchedulingStrategy.UNGROUPED_SCHEDULING; import static io.trino.spi.connector.Constraint.alwaysTrue; import static io.trino.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryConnectorTest.java b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryConnectorTest.java index 3d0a20e6cab3..43803f61d0e7 100644 --- a/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryConnectorTest.java +++ b/plugin/trino-memory/src/test/java/io/trino/plugin/memory/TestMemoryConnectorTest.java @@ -40,10 +40,10 @@ import java.util.List; import static com.google.common.collect.ImmutableList.toImmutableList; +import static io.trino.FeaturesConfig.JoinDistributionType; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.SystemSessionProperties.ENABLE_LARGE_DYNAMIC_FILTERS; import static io.trino.plugin.memory.MemoryQueryRunner.createMemoryQueryRunner; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.testing.assertions.Assert.assertEquals; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; diff --git a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlConsecutiveJoinBenchmark.java b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlConsecutiveJoinBenchmark.java index d5dbca25db61..42721eec9552 100644 --- a/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlConsecutiveJoinBenchmark.java +++ b/testing/trino-benchmark/src/main/java/io/trino/benchmark/SqlConsecutiveJoinBenchmark.java @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableMap; import io.trino.testing.LocalQueryRunner; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; public class SqlConsecutiveJoinBenchmark extends AbstractSqlBenchmark diff --git a/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/TestTpcdsCostBasedPlan.java b/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/TestTpcdsCostBasedPlan.java index e72c878b0ab7..e70c9ae698c3 100644 --- a/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/TestTpcdsCostBasedPlan.java +++ b/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/TestTpcdsCostBasedPlan.java @@ -15,10 +15,10 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.Session; import io.trino.plugin.tpcds.TpcdsConnectorFactory; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.testing.LocalQueryRunner; import java.util.stream.IntStream; diff --git a/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/TestTpchCostBasedPlan.java b/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/TestTpchCostBasedPlan.java index a4b31a8454d2..4985e5ccce54 100644 --- a/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/TestTpchCostBasedPlan.java +++ b/testing/trino-benchto-benchmarks/src/test/java/io/trino/sql/planner/TestTpchCostBasedPlan.java @@ -15,11 +15,11 @@ package io.trino.sql.planner; import com.google.common.collect.ImmutableMap; +import io.trino.FeaturesConfig.JoinDistributionType; +import io.trino.FeaturesConfig.JoinReorderingStrategy; import io.trino.Session.SessionBuilder; import io.trino.plugin.tpch.ColumnNaming; import io.trino.plugin.tpch.TpchConnectorFactory; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy; import io.trino.testing.LocalQueryRunner; import java.util.stream.IntStream; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestIntegrationSmokeTest.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestIntegrationSmokeTest.java index 0b1199d0b001..2ddf2a72110d 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestIntegrationSmokeTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestIntegrationSmokeTest.java @@ -13,8 +13,8 @@ */ package io.trino.testing; +import io.trino.FeaturesConfig.JoinDistributionType; import io.trino.Session; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; import org.intellij.lang.annotations.Language; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestJoinQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestJoinQueries.java index 28b90d78496d..82485ee44237 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestJoinQueries.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestJoinQueries.java @@ -14,12 +14,12 @@ package io.trino.testing; import com.google.common.collect.ImmutableList; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.SystemSessionProperties; import io.trino.execution.QueryStats; import io.trino.operator.OperatorStats; import io.trino.spi.type.Decimals; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.tests.QueryTemplate; import io.trino.tpch.TpchTable; import org.intellij.lang.annotations.Language; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java index 5c99965bca85..a0eb1c493c3c 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java @@ -18,6 +18,8 @@ import com.google.common.collect.MoreCollectors; import com.google.errorprone.annotations.CanIgnoreReturnValue; import io.airlift.units.Duration; +import io.trino.FeaturesConfig; +import io.trino.FeaturesConfig.JoinDistributionType; import io.trino.Session; import io.trino.cost.CostCalculator; import io.trino.cost.CostCalculatorUsingExchanges; @@ -37,8 +39,6 @@ import io.trino.spi.QueryId; import io.trino.spi.type.Type; import io.trino.spi.type.TypeOperators; -import io.trino.sql.analyzer.FeaturesConfig; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; import io.trino.sql.analyzer.QueryExplainer; import io.trino.sql.parser.SqlParser; import io.trino.sql.planner.Plan; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java b/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java index ea35ca00f399..eefaf8022eec 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java @@ -13,11 +13,11 @@ */ package io.trino.testing; +import io.trino.FeaturesConfig.JoinDistributionType; import io.trino.Session; import io.trino.cost.StatsAndCosts; import io.trino.metadata.Metadata; import io.trino.metadata.QualifiedObjectName; -import io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; import io.trino.sql.planner.Plan; import io.trino.sql.planner.plan.LimitNode; import io.trino.testing.sql.TestTable; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/BaseDynamicPartitionPruningTest.java b/testing/trino-testing/src/main/java/io/trino/testing/BaseDynamicPartitionPruningTest.java index fcf05e7af49a..ce784225ba2f 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/BaseDynamicPartitionPruningTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/BaseDynamicPartitionPruningTest.java @@ -34,6 +34,8 @@ import java.util.Set; import static com.google.common.collect.Iterables.getOnlyElement; +import static io.trino.FeaturesConfig.JoinDistributionType.PARTITIONED; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.SystemSessionProperties.ENABLE_LARGE_DYNAMIC_FILTERS; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; @@ -41,8 +43,6 @@ import static io.trino.spi.predicate.Domain.singleValue; import static io.trino.spi.predicate.Range.range; import static io.trino.spi.type.BigintType.BIGINT; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.PARTITIONED; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static io.trino.tpch.TpchTable.LINE_ITEM; import static io.trino.tpch.TpchTable.ORDERS; diff --git a/testing/trino-tests/src/test/java/io/trino/execution/TestCoordinatorDynamicFiltering.java b/testing/trino-tests/src/test/java/io/trino/execution/TestCoordinatorDynamicFiltering.java index 6fc3bd9f7e9f..4e955ccff8f6 100644 --- a/testing/trino-tests/src/test/java/io/trino/execution/TestCoordinatorDynamicFiltering.java +++ b/testing/trino-tests/src/test/java/io/trino/execution/TestCoordinatorDynamicFiltering.java @@ -63,6 +63,10 @@ import java.util.stream.LongStream; import static com.google.common.collect.ImmutableList.toImmutableList; +import static io.trino.FeaturesConfig.JoinDistributionType; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; +import static io.trino.FeaturesConfig.JoinDistributionType.PARTITIONED; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.SystemSessionProperties.ENABLE_COORDINATOR_DYNAMIC_FILTERS_DISTRIBUTION; import static io.trino.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; @@ -75,10 +79,6 @@ import static io.trino.spi.predicate.Range.range; import static io.trino.spi.type.BigintType.BIGINT; import static io.trino.spi.type.VarcharType.createVarcharType; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.PARTITIONED; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.testing.TestingSession.testSessionBuilder; import static io.trino.testing.TestingSplit.createRemoteSplit; import static java.util.Objects.requireNonNull; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/AbstractTestEngineOnlyQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/AbstractTestEngineOnlyQueries.java index f5139d28baea..1c0a134312d5 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/AbstractTestEngineOnlyQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/AbstractTestEngineOnlyQueries.java @@ -57,6 +57,8 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Iterables.getOnlyElement; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.SystemSessionProperties.IGNORE_DOWNSTREAM_PREFERENCES; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; @@ -66,8 +68,6 @@ import static io.trino.spi.type.DecimalType.createDecimalType; import static io.trino.spi.type.DoubleType.DOUBLE; import static io.trino.spi.type.VarcharType.VARCHAR; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.sql.tree.ExplainType.Type.DISTRIBUTED; import static io.trino.sql.tree.ExplainType.Type.IO; import static io.trino.sql.tree.ExplainType.Type.LOGICAL; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestDictionaryAggregation.java b/testing/trino-tests/src/test/java/io/trino/tests/TestDictionaryAggregation.java index d1802af6754f..03ad3b2f6fb2 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestDictionaryAggregation.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestDictionaryAggregation.java @@ -20,9 +20,9 @@ import io.trino.testing.QueryRunner; import org.testng.annotations.Test; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.SystemSessionProperties.DICTIONARY_AGGREGATION; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.testing.TestingSession.testSessionBuilder; public class TestDictionaryAggregation diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedEngineOnlyQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedEngineOnlyQueries.java index 6b0b7df907e1..eb097f7023b6 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedEngineOnlyQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedEngineOnlyQueries.java @@ -28,9 +28,9 @@ import java.util.regex.Pattern; import static io.airlift.testing.Closeables.closeAllSuppress; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; import static io.trino.plugin.memory.MemoryQueryRunner.createMemoryQueryRunner; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; import static io.trino.testing.TestingSession.createBogusTestingCatalog; import static io.trino.testing.assertions.Assert.assertEventually; import static io.trino.testing.sql.TestTable.randomTableSuffix; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestLateMaterializationQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestLateMaterializationQueries.java index 32fee43ec037..7d234071ab3f 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestLateMaterializationQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestLateMaterializationQueries.java @@ -24,12 +24,12 @@ import org.intellij.lang.annotations.Language; import org.testng.annotations.Test; +import static io.trino.FeaturesConfig.JoinDistributionType.BROADCAST; +import static io.trino.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.SystemSessionProperties.FILTERING_SEMI_JOIN_TO_INNER; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; import static io.trino.SystemSessionProperties.LATE_MATERIALIZATION; -import static io.trino.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST; -import static io.trino.sql.analyzer.FeaturesConfig.JoinReorderingStrategy.NONE; import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static org.testng.Assert.assertTrue; diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestQuerySpillLimits.java b/testing/trino-tests/src/test/java/io/trino/tests/TestQuerySpillLimits.java index 8be9e020faa6..2c7fed39ed0f 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestQuerySpillLimits.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestQuerySpillLimits.java @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Files; import io.airlift.units.DataSize; +import io.trino.FeaturesConfig; import io.trino.Session; import io.trino.plugin.tpch.TpchConnectorFactory; import io.trino.spiller.NodeSpillConfig; -import io.trino.sql.analyzer.FeaturesConfig; import io.trino.testing.LocalQueryRunner; import io.trino.testing.QueryRunner; import org.testng.annotations.AfterMethod;