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 ba463951f931..c9ffc8507f77 100644 --- a/core/trino-main/src/main/java/io/trino/SystemSessionProperties.java +++ b/core/trino-main/src/main/java/io/trino/SystemSessionProperties.java @@ -16,9 +16,6 @@ import com.google.common.collect.ImmutableList; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.trino.sql.planner.OptimizerConfig; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; -import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.execution.DynamicFilterConfig; import io.trino.execution.QueryManagerConfig; import io.trino.execution.TaskManagerConfig; @@ -28,6 +25,9 @@ import io.trino.operator.RetryPolicy; import io.trino.spi.TrinoException; import io.trino.spi.session.PropertyMetadata; +import io.trino.sql.planner.OptimizerConfig; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; +import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import javax.inject.Inject; diff --git a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/VarcharToTimestampWithTimeZoneCast.java b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/VarcharToTimestampWithTimeZoneCast.java index 3c43cbc46b7f..f9ececb433b5 100644 --- a/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/VarcharToTimestampWithTimeZoneCast.java +++ b/core/trino-main/src/main/java/io/trino/operator/scalar/timestamptz/VarcharToTimestampWithTimeZoneCast.java @@ -26,7 +26,6 @@ import java.time.DateTimeException; import java.time.ZoneId; import java.time.ZonedDateTime; -import java.time.zone.ZoneRulesException; import java.util.function.Function; import java.util.regex.Matcher; 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 e07765f32c20..ee310c30b0c2 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 @@ -33,7 +33,6 @@ import io.trino.client.NodeVersion; import io.trino.connector.ConnectorManager; import io.trino.connector.system.SystemConnectorModule; -import io.trino.sql.planner.OptimizerConfig; import io.trino.dispatcher.DispatchManager; import io.trino.event.SplitMonitor; import io.trino.execution.DynamicFilterConfig; @@ -136,6 +135,7 @@ import io.trino.sql.planner.CompilerConfig; import io.trino.sql.planner.LocalExecutionPlanner; import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.OptimizerConfig; import io.trino.sql.planner.RuleStatsRecorder; import io.trino.sql.planner.TypeAnalyzer; import io.trino.sql.tree.Expression; 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 a7efec5e06eb..cd86f735da9e 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,7 +17,6 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Ordering; import io.airlift.units.DataSize; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.cost.CostComparator; import io.trino.cost.LocalCostEstimate; import io.trino.cost.PlanNodeStatsEstimate; @@ -25,6 +24,7 @@ import io.trino.cost.TaskCountEstimator; import io.trino.matching.Captures; import io.trino.matching.Pattern; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.sql.planner.TypeProvider; import io.trino.sql.planner.iterative.Lookup; import io.trino.sql.planner.iterative.Rule; @@ -40,8 +40,8 @@ import static io.trino.SystemSessionProperties.getJoinDistributionType; import static io.trino.SystemSessionProperties.getJoinMaxBroadcastTableSize; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.AUTOMATIC; import static io.trino.cost.CostCalculatorWithEstimatedExchanges.calculateJoinCostWithoutOutput; +import static io.trino.sql.planner.OptimizerConfig.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 0853009b8a4d..e1475b6d5124 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,7 +15,6 @@ import com.google.common.collect.Ordering; import io.airlift.units.DataSize; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.cost.CostComparator; import io.trino.cost.LocalCostEstimate; import io.trino.cost.PlanNodeStatsEstimate; @@ -23,6 +22,7 @@ import io.trino.cost.TaskCountEstimator; import io.trino.matching.Captures; import io.trino.matching.Pattern; +import io.trino.sql.planner.OptimizerConfig.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 0f0da4028ee6..106f52d133c4 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 @@ -17,10 +17,10 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.trino.Session; -import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.matching.Captures; import io.trino.matching.Pattern; import io.trino.sql.PlannerContext; +import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.sql.planner.PlanNodeIdAllocator; import io.trino.sql.planner.Symbol; import io.trino.sql.planner.TypeAnalyzer; 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 9b4503e7b59f..819eacc0e300 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 @@ -23,7 +23,6 @@ import com.google.common.collect.Sets; import io.airlift.log.Logger; import io.trino.Session; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.cost.CostComparator; import io.trino.cost.CostProvider; import io.trino.cost.PlanCostEstimate; @@ -35,6 +34,7 @@ import io.trino.metadata.Metadata; import io.trino.sql.PlannerContext; import io.trino.sql.planner.EqualityInference; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.sql.planner.PlanNodeIdAllocator; import io.trino.sql.planner.Symbol; import io.trino.sql.planner.SymbolsExtractor; @@ -73,12 +73,12 @@ import static io.trino.SystemSessionProperties.getJoinDistributionType; import static io.trino.SystemSessionProperties.getJoinReorderingStrategy; import static io.trino.SystemSessionProperties.getMaxReorderedJoins; -import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.AUTOMATIC; 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.planner.DeterminismEvaluator.isDeterministic; import static io.trino.sql.planner.EqualityInference.nonInferrableConjuncts; +import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.AUTOMATIC; import static io.trino.sql.planner.iterative.rule.DetermineJoinDistributionType.canReplicate; import static io.trino.sql.planner.iterative.rule.PushProjectionThroughJoin.pushProjectionThroughJoin; import static io.trino.sql.planner.iterative.rule.ReorderJoins.JoinEnumerationResult.INFINITE_COST_RESULT; 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 6f138c983a53..28cdd650f262 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 @@ -37,7 +37,6 @@ import io.trino.connector.system.TableCommentSystemTable; import io.trino.connector.system.TablePropertiesSystemTable; import io.trino.connector.system.TransactionsSystemTable; -import io.trino.sql.planner.OptimizerConfig; import io.trino.cost.ComposableStatsCalculator; import io.trino.cost.CostCalculator; import io.trino.cost.CostCalculatorUsingExchanges; @@ -154,6 +153,7 @@ import io.trino.sql.planner.LocalExecutionPlanner.LocalExecutionPlan; import io.trino.sql.planner.LogicalPlanner; import io.trino.sql.planner.NodePartitioningManager; +import io.trino.sql.planner.OptimizerConfig; import io.trino.sql.planner.Plan; import io.trino.sql.planner.PlanFragmenter; import io.trino.sql.planner.PlanNodeIdAllocator; 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 7e37b99727e8..2e98d6f629e4 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 @@ -23,7 +23,6 @@ import io.trino.SystemSessionProperties; import io.trino.connector.MockConnectorFactory; import io.trino.connector.StaticConnectorFactory; -import io.trino.sql.planner.OptimizerConfig; import io.trino.execution.DynamicFilterConfig; import io.trino.execution.QueryManagerConfig; import io.trino.execution.TaskManagerConfig; @@ -66,6 +65,7 @@ import io.trino.sql.PlannerContext; import io.trino.sql.parser.ParsingOptions; import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.OptimizerConfig; import io.trino.sql.rewrite.ShowQueriesRewrite; import io.trino.sql.rewrite.StatementRewrite; import io.trino.sql.tree.Statement; 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 56010fd0e3b1..d0f710f187d8 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 @@ -16,11 +16,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.trino.Session; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; -import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.cost.StatsProvider; import io.trino.metadata.Metadata; import io.trino.sql.DynamicFilters; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; +import io.trino.sql.planner.OptimizerConfig.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 f00dd3772571..2d7bf8fd056e 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.sql.planner.OptimizerConfig.JoinDistributionType; -import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.spi.predicate.Domain; import io.trino.spi.predicate.TupleDomain; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; +import io.trino.sql.planner.OptimizerConfig.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 6c69a5bc79ed..f136a70457ee 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 @@ -17,8 +17,6 @@ import com.google.common.collect.ImmutableMap; import io.airlift.slice.Slices; import io.trino.Session; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; -import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.plugin.tpch.TpchColumnHandle; import io.trino.plugin.tpch.TpchTableHandle; import io.trino.spi.connector.ColumnHandle; @@ -28,6 +26,8 @@ import io.trino.spi.predicate.TupleDomain; import io.trino.spi.predicate.ValueSet; import io.trino.spi.type.RowType; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; +import io.trino.sql.planner.OptimizerConfig.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/iterative/rule/TestDetermineJoinDistributionType.java b/core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/TestDetermineJoinDistributionType.java index 1d5a85281fd6..a28a142c11f8 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.sql.planner.OptimizerConfig.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.planner.OptimizerConfig.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 3a8c13755057..94ed8c38bd3c 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.sql.planner.OptimizerConfig.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.planner.OptimizerConfig.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 2a361e19ddfe..7563a9eac14f 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,13 +15,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; -import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.cost.CostComparator; import io.trino.cost.PlanNodeStatsEstimate; import io.trino.cost.SymbolStatsEstimate; import io.trino.metadata.TestingFunctionResolution; import io.trino.spi.type.Type; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; +import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.sql.planner.Symbol; import io.trino.sql.planner.assertions.PlanMatchPattern; import io.trino.sql.planner.iterative.rule.test.RuleAssert; @@ -42,9 +42,9 @@ 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.spi.type.VarcharType.createUnboundedVarcharType; import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.AUTOMATIC; import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; -import static io.trino.spi.type.VarcharType.createUnboundedVarcharType; import static io.trino.sql.planner.TestingPlannerContext.PLANNER_CONTEXT; import static io.trino.sql.planner.TypeAnalyzer.createTestingTypeAnalyzer; import static io.trino.sql.planner.assertions.PlanMatchPattern.equiJoinClause; 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 e2421205cdc8..145d767ed915 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 @@ -19,9 +19,9 @@ import com.google.common.collect.ImmutableSet; import io.trino.FeaturesConfig; import io.trino.Session; +import io.trino.plugin.tpch.TpchConnectorFactory; import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; -import io.trino.plugin.tpch.TpchConnectorFactory; import io.trino.sql.planner.assertions.BasePlanTest; import io.trino.sql.planner.assertions.PlanMatchPattern; import io.trino.sql.planner.assertions.RowNumberSymbolMatcher; 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 fe79e024f4f2..1be443628207 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 @@ -24,9 +24,9 @@ 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.planner.OptimizerConfig.JoinDistributionType.BROADCAST; import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.ELIMINATE_CROSS_JOINS; -import static io.trino.spi.connector.SortOrder.ASC_NULLS_LAST; 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/sql/query/TestFilterHideInacessibleColumnsSession.java b/core/trino-main/src/test/java/io/trino/sql/query/TestFilterHideInacessibleColumnsSession.java index 878278a9e87b..cbe3a73bab72 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestFilterHideInacessibleColumnsSession.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestFilterHideInacessibleColumnsSession.java @@ -15,7 +15,6 @@ import io.trino.FeaturesConfig; import io.trino.SystemSessionProperties; -import io.trino.sql.planner.OptimizerConfig; import io.trino.execution.DynamicFilterConfig; import io.trino.execution.QueryManagerConfig; import io.trino.execution.TaskManagerConfig; @@ -23,6 +22,7 @@ import io.trino.memory.MemoryManagerConfig; import io.trino.memory.NodeMemoryConfig; import io.trino.metadata.SessionPropertyManager; +import io.trino.sql.planner.OptimizerConfig; import org.testng.annotations.Test; import static org.assertj.core.api.Assertions.assertThatNoException; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveConnectorTest.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveConnectorTest.java index e8045fdff614..784f8fcfeded 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveConnectorTest.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveConnectorTest.java @@ -103,7 +103,6 @@ import static io.trino.SystemSessionProperties.GROUPED_EXECUTION; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.USE_TABLE_SCAN_NODE_PARTITIONING; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; import static io.trino.plugin.hive.HiveColumnHandle.BUCKET_COLUMN_NAME; import static io.trino.plugin.hive.HiveColumnHandle.FILE_MODIFIED_TIME_COLUMN_NAME; import static io.trino.plugin.hive.HiveColumnHandle.FILE_SIZE_COLUMN_NAME; @@ -132,6 +131,7 @@ 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.planner.OptimizerConfig.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 8a0913fcfa6c..d716490c909a 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 @@ -25,8 +25,8 @@ import static com.google.common.base.Verify.verify; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; import static io.trino.plugin.hive.HiveQueryRunner.HIVE_CATALOG; +import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; import static org.testng.Assert.assertEquals; /** 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 dd2df3e73d5c..b1794dcbdbff 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 @@ -16,8 +16,6 @@ import com.google.common.collect.ImmutableSet; import com.google.common.io.Files; import io.trino.Session; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; -import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.plugin.hive.HdfsConfig; import io.trino.plugin.hive.HdfsConfiguration; import io.trino.plugin.hive.HdfsConfigurationInitializer; @@ -33,6 +31,8 @@ import io.trino.plugin.hive.metastore.file.FileHiveMetastoreConfig; import io.trino.spi.TrinoException; import io.trino.spi.security.PrincipalType; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; +import io.trino.sql.planner.OptimizerConfig.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 0454118bf077..c88477eaea2e 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 @@ -83,7 +83,6 @@ import static com.google.common.collect.MoreCollectors.onlyElement; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.PREFERRED_WRITE_PARTITIONING_MIN_NUMBER_OF_PARTITIONS; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; import static io.trino.plugin.hive.HdfsEnvironment.HdfsContext; import static io.trino.plugin.hive.HiveTestUtils.HDFS_ENVIRONMENT; import static io.trino.plugin.iceberg.IcebergFileFormat.ORC; @@ -96,6 +95,7 @@ import static io.trino.spi.type.BigintType.BIGINT; import static io.trino.spi.type.DoubleType.DOUBLE; import static io.trino.spi.type.VarcharType.VARCHAR; +import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; import static io.trino.testing.MaterializedResult.resultBuilder; import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static io.trino.testing.TestingSession.testSessionBuilder; 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 c2edf82cd4e4..5a1305119ee5 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 @@ -51,12 +51,12 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; -import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.NONE; 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.planner.OptimizerConfig.JoinDistributionType.BROADCAST; +import static io.trino.sql.planner.OptimizerConfig.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 2d363627a0ce..087508ac8e8c 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 @@ -41,9 +41,9 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.trino.SystemSessionProperties.ENABLE_LARGE_DYNAMIC_FILTERS; +import static io.trino.plugin.memory.MemoryQueryRunner.createMemoryQueryRunner; import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; -import static io.trino.plugin.memory.MemoryQueryRunner.createMemoryQueryRunner; 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-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 9c4debbbe6cd..ca66fda47762 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 @@ -16,9 +16,9 @@ import com.google.common.collect.ImmutableMap; import io.trino.Session; +import io.trino.plugin.tpcds.TpcdsConnectorFactory; import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; -import io.trino.plugin.tpcds.TpcdsConnectorFactory; 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 5f2a56f9cac7..36f417d4450f 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 @@ -16,10 +16,10 @@ import com.google.common.collect.ImmutableMap; import io.trino.Session.SessionBuilder; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; -import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.plugin.tpch.ColumnNaming; import io.trino.plugin.tpch.TpchConnectorFactory; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; +import io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import io.trino.testing.LocalQueryRunner; import java.util.stream.IntStream; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractDistributedEngineOnlyQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractDistributedEngineOnlyQueries.java index a7ca5caa0618..d3ac03729a7a 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractDistributedEngineOnlyQueries.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractDistributedEngineOnlyQueries.java @@ -29,9 +29,9 @@ import java.util.regex.Pattern; import static com.google.common.collect.ImmutableList.toImmutableList; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; import static io.trino.execution.QueryState.RUNNING; +import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; import static io.trino.testing.assertions.Assert.assertEventually; import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestEngineOnlyQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestEngineOnlyQueries.java index 66be8548bdd6..7b8e3747fe5f 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestEngineOnlyQueries.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestEngineOnlyQueries.java @@ -59,13 +59,13 @@ 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.planner.OptimizerConfig.JoinDistributionType.BROADCAST; -import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.NONE; import static io.trino.spi.type.BigintType.BIGINT; import static io.trino.spi.type.BooleanType.BOOLEAN; 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.planner.OptimizerConfig.JoinDistributionType.BROADCAST; +import static io.trino.sql.planner.OptimizerConfig.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-testing/src/main/java/io/trino/testing/AbstractTestJoinQueries.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestJoinQueries.java index a8690ea90670..9c9583bbed62 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 @@ -28,8 +28,8 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import static io.trino.testing.MaterializedResult.resultBuilder; import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static io.trino.tests.QueryTemplate.parameter; 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 3de7dccbe17c..51870bd501a7 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,7 +18,6 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue; import io.airlift.units.Duration; import io.trino.Session; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.execution.QueryStats; import io.trino.execution.warnings.WarningCollector; import io.trino.metadata.QualifiedObjectName; @@ -31,6 +30,7 @@ import io.trino.spi.type.Type; import io.trino.sql.analyzer.QueryExplainer; import io.trino.sql.parser.SqlParser; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.sql.planner.Plan; import io.trino.sql.planner.optimizations.PlanNodeSearcher; import io.trino.sql.planner.plan.FilterNode; @@ -60,9 +60,9 @@ import static com.google.common.collect.ImmutableList.toImmutableList; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import static io.trino.sql.ParsingUtil.createParsingOptions; import static io.trino.sql.SqlFormatter.formatSql; +import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy; import static io.trino.testing.assertions.Assert.assertEventually; import static io.trino.transaction.TransactionBuilder.transaction; import static java.lang.String.format; 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 2e9eaff9220f..d19911c49f6f 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 @@ -19,7 +19,6 @@ import com.google.common.util.concurrent.UncheckedTimeoutException; import io.airlift.units.Duration; import io.trino.Session; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.cost.StatsAndCosts; import io.trino.dispatcher.DispatchManager; import io.trino.execution.QueryInfo; @@ -27,6 +26,7 @@ import io.trino.metadata.Metadata; import io.trino.metadata.QualifiedObjectName; import io.trino.server.BasicQueryInfo; +import io.trino.sql.planner.OptimizerConfig.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 7d08154ae7e2..64eb3137cb12 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 @@ -17,7 +17,6 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import io.trino.Session; -import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.execution.QueryStats; import io.trino.operator.OperatorStats; import io.trino.server.DynamicFilterService.DynamicFilterDomainStats; @@ -25,6 +24,7 @@ import io.trino.spi.QueryId; import io.trino.spi.predicate.Domain; import io.trino.spi.predicate.ValueSet; +import io.trino.sql.planner.OptimizerConfig.JoinDistributionType; import io.trino.tpch.TpchTable; import org.intellij.lang.annotations.Language; import org.testng.annotations.BeforeClass; @@ -40,12 +40,12 @@ 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; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.PARTITIONED; -import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.NONE; import static io.trino.spi.predicate.Domain.none; 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.planner.OptimizerConfig.JoinDistributionType.PARTITIONED; +import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.NONE; import static io.trino.testing.DataProviders.toDataProvider; import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static io.trino.tpch.TpchTable.LINE_ITEM; diff --git a/testing/trino-testing/src/main/java/io/trino/testing/BaseFailureRecoveryTest.java b/testing/trino-testing/src/main/java/io/trino/testing/BaseFailureRecoveryTest.java index 72c3912ceac9..b74717f2ac99 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/BaseFailureRecoveryTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/BaseFailureRecoveryTest.java @@ -51,8 +51,6 @@ import static io.trino.SystemSessionProperties.ENABLE_DYNAMIC_FILTERING; import static io.trino.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE; import static io.trino.SystemSessionProperties.JOIN_REORDERING_STRATEGY; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.PARTITIONED; -import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.NONE; import static io.trino.execution.FailureInjector.FAILURE_INJECTION_MESSAGE; import static io.trino.execution.FailureInjector.InjectedFailureType.TASK_FAILURE; import static io.trino.execution.FailureInjector.InjectedFailureType.TASK_GET_RESULTS_REQUEST_FAILURE; @@ -61,6 +59,8 @@ import static io.trino.execution.FailureInjector.InjectedFailureType.TASK_MANAGEMENT_REQUEST_TIMEOUT; import static io.trino.spi.predicate.Domain.singleValue; import static io.trino.spi.type.BigintType.BIGINT; +import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.PARTITIONED; +import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.NONE; import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder; import static io.trino.testing.sql.TestTable.randomTableSuffix; import static io.trino.tpch.TpchTable.CUSTOMER; 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 3e985f447e76..5a64978e3c1f 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 @@ -68,15 +68,15 @@ import static io.trino.SystemSessionProperties.TASK_CONCURRENCY; import static io.trino.SystemSessionProperties.getJoinDistributionType; import static io.trino.SystemSessionProperties.isEnableCoordinatorDynamicFiltersDistribution; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; -import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.PARTITIONED; -import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.NONE; import static io.trino.spi.predicate.Domain.multipleValues; 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.spi.type.VarcharType.createVarcharType; +import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType; +import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.BROADCAST; +import static io.trino.sql.planner.OptimizerConfig.JoinDistributionType.PARTITIONED; +import static io.trino.sql.planner.OptimizerConfig.JoinReorderingStrategy.NONE; import static io.trino.testing.TestingSession.testSessionBuilder; import static io.trino.testing.TestingSplit.createRemoteSplit; import static java.util.Objects.requireNonNull;